From: Matthias Wachs Date: Mon, 19 Dec 2011 13:08:25 +0000 (+0000) Subject: added LRN's patch from mantis bug 1998 X-Git-Tag: initial-import-from-subversion-38251~15584 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e044704044e341d9e296f701e0d88619aa15061e;p=oweals%2Fgnunet.git added LRN's patch from mantis bug 1998 --- 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"); }