From ada85aa0b4428ac8336b19e621f1d62d48287a48 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 16 Sep 2011 08:53:47 +0000 Subject: towards fixing 1773 --- src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/hostlist/test_gnunet_daemon_hostlist_reconnect.c') diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c index 078c2a54e..7280d85f9 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c @@ -61,11 +61,21 @@ static struct PeerContext p2; static void clean_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { + if (NULL != p1.ghh) + { + GNUNET_TRANSPORT_get_hello_cancel (p1.ghh); + p1.ghh = NULL; + } if (p1.th != NULL) { GNUNET_TRANSPORT_disconnect (p1.th); p1.th = NULL; } + if (NULL != p2.ghh) + { + GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); + p2.ghh = NULL; + } if (p2.th != NULL) { GNUNET_TRANSPORT_disconnect (p2.th); @@ -123,6 +133,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"); } -- cgit v1.2.3