diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-05-23 00:38:03 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-05-23 00:38:03 +0000 |
commit | 1b28dd2099a9a8e7a804a098c670cd47ba507618 (patch) | |
tree | 1cb5944089e391c32311160fe0daa6f11e2cbdb1 /src | |
parent | 69eacfdf1b38076561465b6ad29a6eb647168abc (diff) | |
download | gnunet-1b28dd2099a9a8e7a804a098c670cd47ba507618.tar.gz gnunet-1b28dd2099a9a8e7a804a098c670cd47ba507618.zip |
- fix test tmt_rdy size request
Diffstat (limited to 'src')
-rw-r--r-- | src/cadet/test_cadet.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c index 8b103a4a9..fb2a99f5b 100644 --- a/src/cadet/test_cadet.c +++ b/src/cadet/test_cadet.c | |||
@@ -330,8 +330,9 @@ data_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
330 | channel = ch; | 330 | channel = ch; |
331 | } | 331 | } |
332 | th = GNUNET_CADET_notify_transmit_ready (channel, GNUNET_NO, | 332 | th = GNUNET_CADET_notify_transmit_ready (channel, GNUNET_NO, |
333 | GNUNET_TIME_UNIT_FOREVER_REL, | 333 | GNUNET_TIME_UNIT_FOREVER_REL, |
334 | size_payload, &tmt_rdy, (void *) 1L); | 334 | size_payload + data_sent, |
335 | &tmt_rdy, (void *) 1L); | ||
335 | if (NULL == th) | 336 | if (NULL == th) |
336 | { | 337 | { |
337 | unsigned long i = (unsigned long) cls; | 338 | unsigned long i = (unsigned long) cls; |
@@ -489,8 +490,9 @@ data_callback (void *cls, struct GNUNET_CADET_Channel *channel, | |||
489 | if (SPEED != test || (ok_goal - 2) == ok) | 490 | if (SPEED != test || (ok_goal - 2) == ok) |
490 | { | 491 | { |
491 | GNUNET_CADET_notify_transmit_ready (channel, GNUNET_NO, | 492 | GNUNET_CADET_notify_transmit_ready (channel, GNUNET_NO, |
492 | GNUNET_TIME_UNIT_FOREVER_REL, | 493 | GNUNET_TIME_UNIT_FOREVER_REL, |
493 | size_payload, &tmt_rdy, (void *) 1L); | 494 | size_payload + data_sent, |
495 | &tmt_rdy, (void *) 1L); | ||
494 | return GNUNET_OK; | 496 | return GNUNET_OK; |
495 | } | 497 | } |
496 | else | 498 | else |
@@ -506,8 +508,9 @@ data_callback (void *cls, struct GNUNET_CADET_Channel *channel, | |||
506 | data_ack++; | 508 | data_ack++; |
507 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, " received ack %u\n", data_ack); | 509 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, " received ack %u\n", data_ack); |
508 | GNUNET_CADET_notify_transmit_ready (channel, GNUNET_NO, | 510 | GNUNET_CADET_notify_transmit_ready (channel, GNUNET_NO, |
509 | GNUNET_TIME_UNIT_FOREVER_REL, | 511 | GNUNET_TIME_UNIT_FOREVER_REL, |
510 | size_payload, &tmt_rdy, (void *) 1L); | 512 | size_payload + data_sent, |
513 | &tmt_rdy, (void *) 1L); | ||
511 | if (data_ack < TOTAL_PACKETS && SPEED != test) | 514 | if (data_ack < TOTAL_PACKETS && SPEED != test) |
512 | return GNUNET_OK; | 515 | return GNUNET_OK; |
513 | if (ok == 2 && SPEED == test) | 516 | if (ok == 2 && SPEED == test) |