aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_reconnect.c11
1 files changed, 11 insertions, 0 deletions
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;
61static void 61static void
62clean_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 62clean_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
63{ 63{
64 if (NULL != p1.ghh)
65 {
66 GNUNET_TRANSPORT_get_hello_cancel (p1.ghh);
67 p1.ghh = NULL;
68 }
64 if (p1.th != NULL) 69 if (p1.th != NULL)
65 { 70 {
66 GNUNET_TRANSPORT_disconnect (p1.th); 71 GNUNET_TRANSPORT_disconnect (p1.th);
67 p1.th = NULL; 72 p1.th = NULL;
68 } 73 }
74 if (NULL != p2.ghh)
75 {
76 GNUNET_TRANSPORT_get_hello_cancel (p2.ghh);
77 p2.ghh = NULL;
78 }
69 if (p2.th != NULL) 79 if (p2.th != NULL)
70 { 80 {
71 GNUNET_TRANSPORT_disconnect (p2.th); 81 GNUNET_TRANSPORT_disconnect (p2.th);
@@ -123,6 +133,7 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message)
123 struct PeerContext *p = cls; 133 struct PeerContext *p = cls;
124 134
125 GNUNET_TRANSPORT_get_hello_cancel (p->ghh); 135 GNUNET_TRANSPORT_get_hello_cancel (p->ghh);
136 p->ghh = NULL;
126 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 137 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
127 "Received HELLO, starting hostlist service.\n"); 138 "Received HELLO, starting hostlist service.\n");
128} 139}