aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-16 08:53:47 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-16 08:53:47 +0000
commitada85aa0b4428ac8336b19e621f1d62d48287a48 (patch)
tree7c3f6e42867bb4e48eece247b2de1323feabe7ce /src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
parent0099368ffbacff2e93e321f1007faaf095c84016 (diff)
downloadgnunet-ada85aa0b4428ac8336b19e621f1d62d48287a48.tar.gz
gnunet-ada85aa0b4428ac8336b19e621f1d62d48287a48.zip
towards fixing 1773
Diffstat (limited to 'src/hostlist/test_gnunet_daemon_hostlist_reconnect.c')
-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}