aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_unreliability.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-06-20 09:40:46 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-06-20 09:40:46 +0000
commitaccae6c152eaacdf41b6069b88b3e5744ff06bba (patch)
tree47b74de90dd00e6b0a758fd84dfda7dd3c286d3c /src/transport/test_transport_api_unreliability.c
parent4689e6e012bb19c206dd6c2600ef107166107706 (diff)
downloadgnunet-accae6c152eaacdf41b6069b88b3e5744ff06bba.tar.gz
gnunet-accae6c152eaacdf41b6069b88b3e5744ff06bba.zip
fixing: assertion failed at transport_api_new.c:1277
Diffstat (limited to 'src/transport/test_transport_api_unreliability.c')
-rw-r--r--src/transport/test_transport_api_unreliability.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c
index 67e71e073..b717cb8a0 100644
--- a/src/transport/test_transport_api_unreliability.c
+++ b/src/transport/test_transport_api_unreliability.c
@@ -108,6 +108,9 @@ static int msg_sent;
108static int msg_recv_expected; 108static int msg_recv_expected;
109static int msg_recv; 109static int msg_recv;
110 110
111static int p1_hello_canceled;
112static int p2_hello_canceled;
113
111/** 114/**
112 * Sets a bit active in the bitmap. 115 * Sets a bit active in the bitmap.
113 * 116 *
@@ -529,8 +532,18 @@ notify_connect (void *cls,
529 if (GNUNET_SCHEDULER_NO_TASK != die_task) 532 if (GNUNET_SCHEDULER_NO_TASK != die_task)
530 GNUNET_SCHEDULER_cancel (tct); 533 GNUNET_SCHEDULER_cancel (tct);
531 tct = GNUNET_SCHEDULER_NO_TASK; 534 tct = GNUNET_SCHEDULER_NO_TASK;
532 GNUNET_TRANSPORT_get_hello_cancel (p2.th, &exchange_hello_last, &p2); 535
533 GNUNET_TRANSPORT_get_hello_cancel (p1.th, &exchange_hello, &p1); 536 if (p2_hello_canceled == GNUNET_NO)
537 {
538 GNUNET_TRANSPORT_get_hello_cancel (p2.th, &exchange_hello_last, &p2);
539 p2_hello_canceled = GNUNET_YES;
540 }
541 if (p1_hello_canceled == GNUNET_NO)
542 {
543 GNUNET_TRANSPORT_get_hello_cancel (p1.th, &exchange_hello, &p1);
544 p1_hello_canceled = GNUNET_YES;
545 }
546
534 die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, 547 die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
535 &end_badly, NULL); 548 &end_badly, NULL);
536 GNUNET_TRANSPORT_notify_transmit_ready (p2.th, 549 GNUNET_TRANSPORT_notify_transmit_ready (p2.th,
@@ -750,7 +763,9 @@ run (void *cls,
750 GNUNET_assert(p1.th != NULL); 763 GNUNET_assert(p1.th != NULL);
751 GNUNET_assert(p2.th != NULL); 764 GNUNET_assert(p2.th != NULL);
752 GNUNET_TRANSPORT_get_hello (p1.th, &exchange_hello, &p1); 765 GNUNET_TRANSPORT_get_hello (p1.th, &exchange_hello, &p1);
766 p1_hello_canceled = GNUNET_NO;
753 GNUNET_TRANSPORT_get_hello (p2.th, &exchange_hello_last, &p2); 767 GNUNET_TRANSPORT_get_hello (p2.th, &exchange_hello_last, &p2);
768 p2_hello_canceled = GNUNET_NO;
754 tct = GNUNET_SCHEDULER_add_now (&try_connect, NULL); 769 tct = GNUNET_SCHEDULER_add_now (&try_connect, NULL);
755} 770}
756 771