From 7522ee4d7a122ed21193d5cec69880a268c40069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?= =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Thu, 8 Dec 2011 23:38:25 +0400 Subject: [PATCH 1/2] Fix #1998 --- src/hostlist/test_gnunet_daemon_hostlist.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c index cac2cc6..91e0b37 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"); } -- 1.7.4