diff options
Diffstat (limited to 'src/core/test_core_api.c')
-rw-r--r-- | src/core/test_core_api.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index 28805a372..894e4f642 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -46,6 +46,7 @@ struct PeerContext | |||
46 | struct GNUNET_CORE_Handle *ch; | 46 | struct GNUNET_CORE_Handle *ch; |
47 | struct GNUNET_PeerIdentity id; | 47 | struct GNUNET_PeerIdentity id; |
48 | struct GNUNET_TRANSPORT_Handle *th; | 48 | struct GNUNET_TRANSPORT_Handle *th; |
49 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; | ||
49 | struct GNUNET_MessageHeader *hello; | 50 | struct GNUNET_MessageHeader *hello; |
50 | int connect_status; | 51 | int connect_status; |
51 | #if START_ARM | 52 | #if START_ARM |
@@ -91,8 +92,8 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
91 | GNUNET_assert (ok == 6); | 92 | GNUNET_assert (ok == 6); |
92 | GNUNET_CORE_disconnect (p1.ch); | 93 | GNUNET_CORE_disconnect (p1.ch); |
93 | GNUNET_CORE_disconnect (p2.ch); | 94 | GNUNET_CORE_disconnect (p2.ch); |
94 | GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1); | 95 | GNUNET_TRANSPORT_get_hello_cancel (p1.ghh); |
95 | GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2); | 96 | GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); |
96 | GNUNET_TRANSPORT_disconnect (p1.th); | 97 | GNUNET_TRANSPORT_disconnect (p1.th); |
97 | GNUNET_TRANSPORT_disconnect (p2.th); | 98 | GNUNET_TRANSPORT_disconnect (p2.th); |
98 | ok = 0; | 99 | ok = 0; |
@@ -118,13 +119,13 @@ terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
118 | } | 119 | } |
119 | if (p1.th != NULL) | 120 | if (p1.th != NULL) |
120 | { | 121 | { |
121 | GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1); | 122 | GNUNET_TRANSPORT_get_hello_cancel (p1.ghh); |
122 | GNUNET_TRANSPORT_disconnect (p1.th); | 123 | GNUNET_TRANSPORT_disconnect (p1.th); |
123 | p1.th = NULL; | 124 | p1.th = NULL; |
124 | } | 125 | } |
125 | if (p2.th != NULL) | 126 | if (p2.th != NULL) |
126 | { | 127 | { |
127 | GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2); | 128 | GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); |
128 | GNUNET_TRANSPORT_disconnect (p2.th); | 129 | GNUNET_TRANSPORT_disconnect (p2.th); |
129 | p2.th = NULL; | 130 | p2.th = NULL; |
130 | } | 131 | } |
@@ -312,7 +313,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
312 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 313 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
313 | p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL); | 314 | p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL); |
314 | GNUNET_assert (p->th != NULL); | 315 | GNUNET_assert (p->th != NULL); |
315 | GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p); | 316 | p->ghh = GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p); |
316 | } | 317 | } |
317 | 318 | ||
318 | 319 | ||