diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-04-07 20:04:28 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-04-07 20:04:28 +0000 |
commit | 75bc417231ee86ce1f69e477cd5aa7b23f8a08f4 (patch) | |
tree | 6ff1a9a75264846a0a488b244718e7ae1a233b12 /src | |
parent | 9f2882bbd4e94f84f8fc97313fcf29aa3dc629db (diff) | |
download | gnunet-75bc417231ee86ce1f69e477cd5aa7b23f8a08f4.tar.gz gnunet-75bc417231ee86ce1f69e477cd5aa7b23f8a08f4.zip |
- fix count check
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/test_mesh_small.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c index 20b5c2717..f75123d3c 100644 --- a/src/mesh/test_mesh_small.c +++ b/src/mesh/test_mesh_small.c | |||
@@ -528,6 +528,10 @@ static void | |||
528 | stats_cont (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg) | 528 | stats_cont (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg) |
529 | { | 529 | { |
530 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "stats_cont for peer %u\n", cls); | 530 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "stats_cont for peer %u\n", cls); |
531 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, " sent: %u, received: %u\n", | ||
532 | ka_sent, ka_received); | ||
533 | if (ka_sent < 2 || ka_sent > ka_received + 1) | ||
534 | ok--; | ||
531 | GNUNET_TESTBED_operation_done (stats_op); | 535 | GNUNET_TESTBED_operation_done (stats_op); |
532 | 536 | ||
533 | if (GNUNET_SCHEDULER_NO_TASK != disconnect_task) | 537 | if (GNUNET_SCHEDULER_NO_TASK != disconnect_task) |
@@ -565,13 +569,7 @@ stats_iterator (void *cls, const struct GNUNET_TESTBED_Peer *peer, | |||
565 | ka_sent = value; | 569 | ka_sent = value; |
566 | 570 | ||
567 | if (0 == strncmp(s_recv, name, strlen (s_recv)) && 4 == i) | 571 | if (0 == strncmp(s_recv, name, strlen (s_recv)) && 4 == i) |
568 | { | ||
569 | ka_received = value; | 572 | ka_received = value; |
570 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, " sent: %u, received: %u\n", | ||
571 | ka_sent, ka_received); | ||
572 | if (ka_sent < 2 || ka_sent > ka_received + 1) | ||
573 | ok--; | ||
574 | } | ||
575 | 573 | ||
576 | return GNUNET_OK; | 574 | return GNUNET_OK; |
577 | } | 575 | } |
@@ -672,8 +670,7 @@ channel_cleaner (void *cls, const struct GNUNET_MESH_Channel *channel, | |||
672 | long i = (long) cls; | 670 | long i = (long) cls; |
673 | 671 | ||
674 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 672 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
675 | "Incoming channel disconnected at peer %d\n", | 673 | "Incoming channel disconnected at peer %ld\n", i); |
676 | i); | ||
677 | if (4L == i) | 674 | if (4L == i) |
678 | { | 675 | { |
679 | ok++; | 676 | ok++; |