aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/test_gnunet_daemon_hostlist.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-12-19 13:08:25 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-12-19 13:08:25 +0000
commite044704044e341d9e296f701e0d88619aa15061e (patch)
treea72bd198ee4e0450bf5bb468e8b37dad739fead4 /src/hostlist/test_gnunet_daemon_hostlist.c
parent4a85d6bfc156183e69a5e746c54cdb5a83f33226 (diff)
downloadgnunet-e044704044e341d9e296f701e0d88619aa15061e.tar.gz
gnunet-e044704044e341d9e296f701e0d88619aa15061e.zip
added LRN's patch from mantis bug 1998
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}