aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/test_gnunet_daemon_hostlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hostlist/test_gnunet_daemon_hostlist.c')
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist.c11
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 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)
62{ 62{
63 if (p1.th != NULL) 63 if (p1.th != NULL)
64 { 64 {
65 if (p1.ghh != NULL)
66 {
67 GNUNET_TRANSPORT_get_hello_cancel (p1.ghh);
68 p1.ghh = NULL;
69 }
65 GNUNET_TRANSPORT_disconnect (p1.th); 70 GNUNET_TRANSPORT_disconnect (p1.th);
66 p1.th = NULL; 71 p1.th = NULL;
67 } 72 }
68 if (p2.th != NULL) 73 if (p2.th != NULL)
69 { 74 {
75 if (p2.ghh != NULL)
76 {
77 GNUNET_TRANSPORT_get_hello_cancel (p2.ghh);
78 p2.ghh = NULL;
79 }
70 GNUNET_TRANSPORT_disconnect (p2.th); 80 GNUNET_TRANSPORT_disconnect (p2.th);
71 p2.th = NULL; 81 p2.th = NULL;
72 } 82 }
@@ -118,6 +128,7 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message)
118 struct PeerContext *p = cls; 128 struct PeerContext *p = cls;
119 129
120 GNUNET_TRANSPORT_get_hello_cancel (p->ghh); 130 GNUNET_TRANSPORT_get_hello_cancel (p->ghh);
131 p->ghh = NULL;
121 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 132 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
122 "Received HELLO, starting hostlist service.\n"); 133 "Received HELLO, starting hostlist service.\n");
123} 134}