aboutsummaryrefslogtreecommitdiff
path: root/btcore/src/counter.c
diff options
context:
space:
mode:
Diffstat (limited to 'btcore/src/counter.c')
-rw-r--r--btcore/src/counter.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/btcore/src/counter.c b/btcore/src/counter.c
index 08aa518ae..b88c7a27e 100644
--- a/btcore/src/counter.c
+++ b/btcore/src/counter.c
@@ -257,6 +257,10 @@ static bool counter_foreach_cb_(hash_map_entry_t *hash_map_entry, void *context)
}
static bool counter_socket_open(void) {
+#if (!defined(BT_NET_DEBUG) || (BT_NET_DEBUG != TRUE))
+ return true; // Disable using network sockets for security reasons
+#endif
+
assert(listen_socket_ == NULL);
assert(thread_ == NULL);
assert(clients_ == NULL);
@@ -294,6 +298,10 @@ error:;
}
static void counter_socket_close(void) {
+#if (!defined(BT_NET_DEBUG) || (BT_NET_DEBUG != TRUE))
+ return; // Disable using network sockets for security reasons
+#endif
+
socket_free(listen_socket_);
thread_free(thread_);
list_free(clients_);