summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/CMakeLists.txt2
-rw-r--r--src/ipcpd/common/connmgr.c2
-rw-r--r--src/ipcpd/config.h.in1
-rw-r--r--src/ipcpd/unicast/connmgr.c4
-rw-r--r--src/ipcpd/unicast/dir/dht.c4
5 files changed, 4 insertions, 9 deletions
diff --git a/src/ipcpd/CMakeLists.txt b/src/ipcpd/CMakeLists.txt
index 54294f11..b3b049e3 100644
--- a/src/ipcpd/CMakeLists.txt
+++ b/src/ipcpd/CMakeLists.txt
@@ -16,8 +16,6 @@ set(IPCP_SCHED_THR_MUL 2 CACHE STRING
"Number of scheduler threads per QoS cube")
set(DISABLE_CORE_LOCK TRUE CACHE BOOL
"Disable locking performance threads to a core")
-set(IPCP_CONN_WAIT_DIR TRUE CACHE BOOL
- "Check the running state of the directory when adding a dt connection")
set(DHT_ENROLL_SLACK 50 CACHE STRING
"DHT enrollment waiting time (0-999, ms)")
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
diff --git a/src/ipcpd/common/connmgr.c b/src/ipcpd/common/connmgr.c
index eed6238e..6dd5fed0 100644
--- a/src/ipcpd/common/connmgr.c
+++ b/src/ipcpd/common/connmgr.c
@@ -512,7 +512,7 @@ int connmgr_dealloc(enum comp_id id,
case COMPID_DT:
notifier_event(NOTIFY_DT_CONN_DEL, conn);
break;
-#if defined(BUILD_IPCP_UNICAST) && defined(IPCP_CONN_WAIT_DIR)
+#if defined(BUILD_IPCP_UNICAST)
case COMPID_MGMT:
notifier_event(NOTIFY_MGMT_CONN_DEL, conn);
break;
diff --git a/src/ipcpd/config.h.in b/src/ipcpd/config.h.in
index b3a118ac..d2af6440 100644
--- a/src/ipcpd/config.h.in
+++ b/src/ipcpd/config.h.in
@@ -51,7 +51,6 @@
#define IPCP_UNICAST_MPL @IPCP_UNICAST_MPL@
#define CONNMGR_RCV_TIMEOUT @CONNMGR_RCV_TIMEOUT@
-#cmakedefine IPCP_CONN_WAIT_DIR
#cmakedefine DISABLE_CORE_LOCK
#cmakedefine IPCP_FLOW_STATS
#cmakedefine IPCP_DEBUG_LOCAL
diff --git a/src/ipcpd/unicast/connmgr.c b/src/ipcpd/unicast/connmgr.c
index 11c5d5b6..07568fb5 100644
--- a/src/ipcpd/unicast/connmgr.c
+++ b/src/ipcpd/unicast/connmgr.c
@@ -32,8 +32,4 @@
#define BUILD_IPCP_UNICAST
-#ifdef IPCP_CONN_WAIT_DIR
- #include "dir.h"
-#endif
-
#include "common/connmgr.c"
diff --git a/src/ipcpd/unicast/dir/dht.c b/src/ipcpd/unicast/dir/dht.c
index 4a243059..a56c8af2 100644
--- a/src/ipcpd/unicast/dir/dht.c
+++ b/src/ipcpd/unicast/dir/dht.c
@@ -3693,6 +3693,8 @@ static void dht_kv_replicate(void)
list_head_init(&repl);
list_head_init(&rebl);
+ pthread_cleanup_push(free, key);
+
while (dht_kv_next_values(key, &repl, &rebl) == 0) {
dht_kv_replicate_values(key, &repl, &rebl);
if (!list_is_empty(&repl)) {
@@ -3708,7 +3710,7 @@ static void dht_kv_replicate(void)
}
}
- free(key);
+ pthread_cleanup_pop(true);
}
static void dht_kv_refresh_contacts(void)