diff options
Diffstat (limited to 'src/transport/test_transport_api_unreliability_constant.c')
-rw-r--r-- | src/transport/test_transport_api_unreliability_constant.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c index f5adeb25c..a74e6d2eb 100644 --- a/src/transport/test_transport_api_unreliability_constant.c +++ b/src/transport/test_transport_api_unreliability_constant.c | |||
@@ -80,6 +80,8 @@ char *cfg_file_p2; | |||
80 | uint32_t max_bps_p1; | 80 | uint32_t max_bps_p1; |
81 | uint32_t max_bps_p2; | 81 | uint32_t max_bps_p2; |
82 | 82 | ||
83 | static GNUNET_TRANSPORT_TESTING_ConnectRequest cc; | ||
84 | |||
83 | /* | 85 | /* |
84 | * Testcase specific declarations | 86 | * Testcase specific declarations |
85 | */ | 87 | */ |
@@ -151,6 +153,10 @@ end () | |||
151 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); | 153 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); |
152 | th = NULL; | 154 | th = NULL; |
153 | 155 | ||
156 | if (cc != NULL) | ||
157 | GNUNET_TRANSPORT_TESTING_connect_peers_cancel(tth, cc); | ||
158 | cc = NULL; | ||
159 | |||
154 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1); | 160 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1); |
155 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2); | 161 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2); |
156 | 162 | ||
@@ -179,6 +185,10 @@ end_badly () | |||
179 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); | 185 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); |
180 | th = NULL; | 186 | th = NULL; |
181 | 187 | ||
188 | if (cc != NULL) | ||
189 | GNUNET_TRANSPORT_TESTING_connect_peers_cancel(tth, cc); | ||
190 | cc = NULL; | ||
191 | |||
182 | if (p1 != NULL) | 192 | if (p1 != NULL) |
183 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1); | 193 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1); |
184 | if (p2 != NULL) | 194 | if (p2 != NULL) |
@@ -415,6 +425,8 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) | |||
415 | GNUNET_i2s (&p2->id)); | 425 | GNUNET_i2s (&p2->id)); |
416 | GNUNET_free (p1_c); | 426 | GNUNET_free (p1_c); |
417 | 427 | ||
428 | cc = NULL; | ||
429 | |||
418 | GNUNET_SCHEDULER_add_now (&sendtask, NULL); | 430 | GNUNET_SCHEDULER_add_now (&sendtask, NULL); |
419 | } | 431 | } |
420 | 432 | ||
@@ -431,8 +443,7 @@ void start_cb (struct PeerContext * p, | |||
431 | if (started != 2) | 443 | if (started != 2) |
432 | return; | 444 | return; |
433 | 445 | ||
434 | GNUNET_TRANSPORT_TESTING_connect_peers (tth, p1, p2, &testing_connect_cb, NULL); | 446 | cc = GNUNET_TRANSPORT_TESTING_connect_peers (tth, p1, p2, &testing_connect_cb, NULL); |
435 | |||
436 | } | 447 | } |
437 | 448 | ||
438 | static void | 449 | static void |