aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-09-14 11:10:39 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-09-14 11:10:39 +0000
commit222d13720e635e3b14e50ea2e5409eda887d7cef (patch)
treedba23ec79ca11831c90cc3bf04442b38590af348
parentbe3b82bc5505b32807f0cbea9a20c030185e7e29 (diff)
downloadgnunet-222d13720e635e3b14e50ea2e5409eda887d7cef.tar.gz
gnunet-222d13720e635e3b14e50ea2e5409eda887d7cef.zip
-rw-r--r--src/transport/test_transport_api_reliability.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index d5b29e17a..65794a960 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -100,6 +100,7 @@ static char * cert_file_p2;
100 100
101static int msg_scheduled; 101static int msg_scheduled;
102static int msg_sent; 102static int msg_sent;
103static int msg_recv_expected;
103static int msg_recv; 104static int msg_recv;
104 105
105 106
@@ -153,7 +154,7 @@ end_badly (void *cls,
153 const struct GNUNET_SCHEDULER_TaskContext *tc) 154 const struct GNUNET_SCHEDULER_TaskContext *tc)
154{ 155{
155 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 156 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
156 "Reliability failed: \nLast message scheduled %u of %u \nLast message sent %u \nLast message received %u \n ", msg_scheduled, TOTAL_MSGS, msg_sent, msg_recv); 157 "Reliability failed: \nLast message sent %u \nNext message scheduled %u\nLast message received %u\nMessage expected %u \n ", msg_sent, msg_scheduled, msg_recv, msg_recv_expected);
157 GNUNET_break (0); 158 GNUNET_break (0);
158 GNUNET_TRANSPORT_disconnect (p1.th); 159 GNUNET_TRANSPORT_disconnect (p1.th);
159 GNUNET_TRANSPORT_disconnect (p2.th); 160 GNUNET_TRANSPORT_disconnect (p2.th);
@@ -196,7 +197,8 @@ notify_receive (void *cls,
196 s = get_size (n); 197 s = get_size (n);
197 if (MTYPE != ntohs (message->type)) 198 if (MTYPE != ntohs (message->type))
198 return; 199 return;
199 msg_recv++; 200 msg_recv_expected = n;
201 msg_recv = ntohl(hdr->num);
200 if (ntohs (message->size) != s) 202 if (ntohs (message->size) != s)
201 { 203 {
202 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 204 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,