aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_address_switch.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-10 19:06:21 +0000
committerChristian Grothoff <christian@grothoff.org>2015-01-10 19:06:21 +0000
commit3de08d824f704bba877c3746596aded7e77dbb7a (patch)
tree66ebe295213877e6dd5c8a33c87233acb1e96a80 /src/transport/test_transport_address_switch.c
parentea90dda803d5f9d51f34d67c24446413c5c9232b (diff)
downloadgnunet-3de08d824f704bba877c3746596aded7e77dbb7a.tar.gz
gnunet-3de08d824f704bba877c3746596aded7e77dbb7a.zip
-clean up testcase
Diffstat (limited to 'src/transport/test_transport_address_switch.c')
-rw-r--r--src/transport/test_transport_address_switch.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/transport/test_transport_address_switch.c b/src/transport/test_transport_address_switch.c
index b5e42352e..e72b2cdee 100644
--- a/src/transport/test_transport_address_switch.c
+++ b/src/transport/test_transport_address_switch.c
@@ -424,10 +424,9 @@ notify_ready (void *cls, size_t size, void *buf)
424{ 424{
425 char *cbuf = buf; 425 char *cbuf = buf;
426 struct TestMessage hdr; 426 struct TestMessage hdr;
427 unsigned int ret;
428 427
429 th = NULL; 428 th = NULL;
430 if (buf == NULL ) 429 if (buf == NULL)
431 { 430 {
432 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, 431 GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
433 "Timeout occurred while waiting for transmit_ready for message\n"); 432 "Timeout occurred while waiting for transmit_ready for message\n");
@@ -446,9 +445,7 @@ notify_ready (void *cls, size_t size, void *buf)
446 hdr.header.type = htons (MTYPE); 445 hdr.header.type = htons (MTYPE);
447 hdr.num = htonl (0); 446 hdr.num = htonl (0);
448 memcpy (&cbuf[0], &hdr, sizeof(struct TestMessage)); 447 memcpy (&cbuf[0], &hdr, sizeof(struct TestMessage));
449 ret += sizeof(struct TestMessage);
450 memset (&cbuf[sizeof(struct TestMessage)], '0', MSIZE - sizeof(struct TestMessage)); 448 memset (&cbuf[sizeof(struct TestMessage)], '0', MSIZE - sizeof(struct TestMessage));
451 ret = MSIZE;
452 449
453#if VERBOSE 450#if VERBOSE
454 char *receiver_s = GNUNET_strdup (GNUNET_i2s (&receiver->id)); 451 char *receiver_s = GNUNET_strdup (GNUNET_i2s (&receiver->id));
@@ -466,10 +463,10 @@ notify_ready (void *cls, size_t size, void *buf)
466 (p1_switch_attempts == p1_switch_fail + p1_switch_success) && 463 (p1_switch_attempts == p1_switch_fail + p1_switch_success) &&
467 (p2_switch_attempts == p2_switch_fail + p2_switch_success) ) 464 (p2_switch_attempts == p2_switch_fail + p2_switch_success) )
468 { 465 {
469 bytes_sent_after_switch += ret; 466 bytes_sent_after_switch += MSIZE;
470 } 467 }
471 468
472 return ret; 469 return MSIZE;
473} 470}
474 471
475 472