From e044704044e341d9e296f701e0d88619aa15061e Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 19 Dec 2011 13:08:25 +0000 Subject: [PATCH] added LRN's patch from mantis bug 1998 --- src/hostlist/test_gnunet_daemon_hostlist.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c index cac2cc67a..91e0b3757 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist.c +++ b/src/hostlist/test_gnunet_daemon_hostlist.c @@ -62,11 +62,21 @@ clean_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { if (p1.th != NULL) { + if (p1.ghh != NULL) + { + GNUNET_TRANSPORT_get_hello_cancel (p1.ghh); + p1.ghh = NULL; + } GNUNET_TRANSPORT_disconnect (p1.th); p1.th = NULL; } if (p2.th != NULL) { + if (p2.ghh != NULL) + { + GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); + p2.ghh = NULL; + } GNUNET_TRANSPORT_disconnect (p2.th); p2.th = NULL; } @@ -118,6 +128,7 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message) struct PeerContext *p = cls; GNUNET_TRANSPORT_get_hello_cancel (p->ghh); + p->ghh = NULL; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received HELLO, starting hostlist service.\n"); } -- 2.25.1