diff options
author | ch3 <buenger@mytum.de> | 2024-05-01 18:53:54 +0200 |
---|---|---|
committer | ch3 <buenger@mytum.de> | 2024-05-01 18:53:54 +0200 |
commit | b9039be88c059d9179a706c7b4bac11138b1b452 (patch) | |
tree | 33f15d5013604175a268a938a395675836c35990 | |
parent | e96ce5a125dd3f75d368b5f87fe7c2a4c1364865 (diff) | |
download | gnunet-b9039be88c059d9179a706c7b4bac11138b1b452.tar.gz gnunet-b9039be88c059d9179a706c7b4bac11138b1b452.zip |
-cong: properly calculate message numbers in underlay dummy testdev/julius-buenger/cong-recover
-rw-r--r-- | src/service/core/test_core_underlay_dummy.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/service/core/test_core_underlay_dummy.c b/src/service/core/test_core_underlay_dummy.c index 861e95b58..ae4c87079 100644 --- a/src/service/core/test_core_underlay_dummy.c +++ b/src/service/core/test_core_underlay_dummy.c | |||
@@ -401,25 +401,26 @@ int main (void) | |||
401 | if (GNUNET_YES != result_address_callback) return -1; | 401 | if (GNUNET_YES != result_address_callback) return -1; |
402 | if (GNUNET_YES != result_connect_cb_0) return -1; | 402 | if (GNUNET_YES != result_connect_cb_0) return -1; |
403 | if (GNUNET_YES != result_connect_cb_1) return -1; | 403 | if (GNUNET_YES != result_connect_cb_1) return -1; |
404 | if (NUMBER_MESSAGES * NUMBER_SENDING_PEERS != result_replys_0) | 404 | if ((NUMBER_SENDING_PEERS > 1) && |
405 | (NUMBER_MESSAGES * NUMBER_CONNECTIONS != result_replys_0)) | ||
405 | { | 406 | { |
406 | LOG(GNUNET_ERROR_TYPE_ERROR, | 407 | LOG(GNUNET_ERROR_TYPE_ERROR, |
407 | "Peer 0 received %u of %u messages\n", | 408 | "Peer 0 received %u of %u messages\n", |
408 | result_replys_0, | 409 | result_replys_0, |
409 | NUMBER_MESSAGES * NUMBER_SENDING_PEERS); | 410 | NUMBER_MESSAGES * NUMBER_CONNECTIONS); |
410 | // XXX: | 411 | // XXX: |
411 | LOG(GNUNET_ERROR_TYPE_ERROR, | 412 | LOG(GNUNET_ERROR_TYPE_ERROR, |
412 | "Peer 1 received %u of %u messages\n", | 413 | "Peer 1 received %u of %u messages\n", |
413 | result_replys_1, | 414 | result_replys_1, |
414 | NUMBER_MESSAGES * NUMBER_SENDING_PEERS); | 415 | NUMBER_MESSAGES * NUMBER_CONNECTIONS); |
415 | return -1; | 416 | return -1; |
416 | } | 417 | } |
417 | if (NUMBER_MESSAGES * NUMBER_SENDING_PEERS != result_replys_1) | 418 | if (NUMBER_MESSAGES * NUMBER_CONNECTIONS != result_replys_1) |
418 | { | 419 | { |
419 | LOG(GNUNET_ERROR_TYPE_ERROR, | 420 | LOG(GNUNET_ERROR_TYPE_ERROR, |
420 | "Peer 1 received %u of %u messages\n", | 421 | "Peer 1 received %u of %u messages\n", |
421 | result_replys_1, | 422 | result_replys_1, |
422 | NUMBER_MESSAGES * NUMBER_SENDING_PEERS); | 423 | NUMBER_MESSAGES * NUMBER_CONNECTIONS); |
423 | return -1; | 424 | return -1; |
424 | } | 425 | } |
425 | return 0; | 426 | return 0; |