aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api.c
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-12-13 10:43:18 +0000
committerNathan S. Evans <evans@in.tum.de>2010-12-13 10:43:18 +0000
commit17c2c0bb0de652b1aa23dd6e92dd4f07384c6224 (patch)
tree776dc0bf3b86939d3033a7bb1917fb67d55fc0a8 /src/transport/test_transport_api.c
parent59181ab42ce8e393e6470d8604feaa5aa424cab3 (diff)
downloadgnunet-17c2c0bb0de652b1aa23dd6e92dd4f07384c6224.tar.gz
gnunet-17c2c0bb0de652b1aa23dd6e92dd4f07384c6224.zip
force request connect message in transport testcase
Diffstat (limited to 'src/transport/test_transport_api.c')
-rw-r--r--src/transport/test_transport_api.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index 5bf57b8be..7ef60bdaa 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -184,6 +184,12 @@ notify_ready (void *cls, size_t size, void *buf)
184 return sizeof (struct GNUNET_MessageHeader); 184 return sizeof (struct GNUNET_MessageHeader);
185} 185}
186 186
187static size_t
188notify_ready_connect (void *cls, size_t size, void *buf)
189{
190 return 0;
191}
192
187 193
188static void 194static void
189notify_connect (void *cls, 195notify_connect (void *cls,
@@ -310,6 +316,14 @@ exchange_hello_last (void *cls,
310 GNUNET_assert (GNUNET_OK == 316 GNUNET_assert (GNUNET_OK ==
311 GNUNET_HELLO_get_id ((const struct GNUNET_HELLO_Message *) 317 GNUNET_HELLO_get_id ((const struct GNUNET_HELLO_Message *)
312 message, &me->id)); 318 message, &me->id));
319
320 GNUNET_assert(NULL != GNUNET_TRANSPORT_notify_transmit_ready (p2.th,
321 &p1.id,
322 sizeof (struct GNUNET_MessageHeader), 0,
323 TIMEOUT,
324 &notify_ready_connect,
325 NULL));
326
313 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 327 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
314 "Finished exchanging HELLOs, now waiting for transmission!\n"); 328 "Finished exchanging HELLOs, now waiting for transmission!\n");
315} 329}
@@ -379,10 +393,10 @@ run (void *cls,
379 setup_peer (&p2, "test_transport_api_http_peer2.conf"); 393 setup_peer (&p2, "test_transport_api_http_peer2.conf");
380 } 394 }
381 else if (is_https) 395 else if (is_https)
382 { 396 {
383 setup_peer (&p1, "test_transport_api_https_peer1.conf"); 397 setup_peer (&p1, "test_transport_api_https_peer1.conf");
384 setup_peer (&p2, "test_transport_api_https_peer2.conf"); 398 setup_peer (&p2, "test_transport_api_https_peer2.conf");
385 } 399 }
386 GNUNET_assert(p1.th != NULL); 400 GNUNET_assert(p1.th != NULL);
387 GNUNET_assert(p2.th != NULL); 401 GNUNET_assert(p2.th != NULL);
388 402