[PATCH] ipcpd: Fix check build for DHT

  • From: Dimitri Staessens <dimitri.staessens@xxxxxxxx>
  • To: ouroboros@xxxxxxxxxxxxx
  • Date: Tue, 8 May 2018 14:42:55 +0200

The DHT test failed on the use of IPCP-specific calls. These calls are
now guarded by the correct defition checks.

Signed-off-by: Dimitri Staessens <dimitri.staessens@xxxxxxxx>
---
 CMakeLists.txt         | 2 +-
 src/ipcpd/normal/dht.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fddff4d..d6d5922 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ include(GNUInstallDirs)
 
 set(PACKAGE_VERSION_MAJOR  0)
 set(PACKAGE_VERSION_MINOR 11)
-set(PACKAGE_VERSION_PATCH  5)
+set(PACKAGE_VERSION_PATCH  6)
 
 set(PACKAGE_NAME        "${CMAKE_PROJECT_NAME}")
 set(PACKAGE_DESCRIPTION "The Ouroboros prototype")
diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c
index 59451d1..b8bd03f 100644
--- a/src/ipcpd/normal/dht.c
+++ b/src/ipcpd/normal/dht.c
@@ -2591,7 +2591,9 @@ static void dht_post_sdu(void *               comp,
         struct dht * dht = (struct dht *) comp;
 
         if (dht_get_state(dht) == DHT_SHUTDOWN) {
+#ifndef __DHT_TEST__
                 ipcp_sdb_release(sdb);
+#endif
                 return;
         }
 
@@ -2636,7 +2638,9 @@ void dht_destroy(struct dht * dht)
         list_for_each_safe(p, h, &dht->cmds) {
                 struct cmd * c = list_entry(p, struct cmd, next);
                 list_del(&c->next);
+#ifndef __DHT_TEST__
                 ipcp_sdb_release(c->sdb);
+#endif
                 free(c);
         }
 
-- 
2.17.0


Other related posts:

  • » [PATCH] ipcpd: Fix check build for DHT - Dimitri Staessens