diff options
author | Gabor X Toth <*@tg-x.net> | 2016-09-22 16:55:08 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2016-09-22 16:55:08 +0000 |
commit | eb5ca15d5225b146043a0a0fc7ff283a878998d9 (patch) | |
tree | b97e0d97c7975fa6f42df0dfad117beccb493099 /src/multicast | |
parent | 72ac76db16854deabaa9cd925a50e3fc345d9eb7 (diff) | |
download | gnunet-eb5ca15d5225b146043a0a0fc7ff283a878998d9.tar.gz gnunet-eb5ca15d5225b146043a0a0fc7ff283a878998d9.zip |
+
Diffstat (limited to 'src/multicast')
-rw-r--r-- | src/multicast/test_multicast.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/multicast/test_multicast.c b/src/multicast/test_multicast.c index 11f42ff82..44c62f677 100644 --- a/src/multicast/test_multicast.c +++ b/src/multicast/test_multicast.c | |||
@@ -274,7 +274,7 @@ member_parted (void *cls) | |||
274 | switch (test) | 274 | switch (test) |
275 | { | 275 | { |
276 | case TEST_MEMBER_JOIN_REFUSE: | 276 | case TEST_MEMBER_JOIN_REFUSE: |
277 | // Test 3 starts here | 277 | // Test 3 starts here |
278 | member_join (TEST_MEMBER_JOIN_ADMIT); | 278 | member_join (TEST_MEMBER_JOIN_ADMIT); |
279 | break; | 279 | break; |
280 | 280 | ||
@@ -305,7 +305,7 @@ member_part () | |||
305 | test = TEST_MEMBER_PART; | 305 | test = TEST_MEMBER_PART; |
306 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 306 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
307 | "Test #%u: member_part()\n", test); | 307 | "Test #%u: member_part()\n", test); |
308 | // Test 10 starts here | 308 | // Test 10 starts here |
309 | GNUNET_SCHEDULER_add_now (&schedule_member_part, NULL); | 309 | GNUNET_SCHEDULER_add_now (&schedule_member_part, NULL); |
310 | } | 310 | } |
311 | 311 | ||
@@ -313,7 +313,7 @@ member_part () | |||
313 | static void | 313 | static void |
314 | member_replay_ok () | 314 | member_replay_ok () |
315 | { | 315 | { |
316 | // Execution of test 8 here | 316 | // Execution of test 8 here |
317 | test = TEST_MEMBER_REPLAY_OK; | 317 | test = TEST_MEMBER_REPLAY_OK; |
318 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 318 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
319 | "Test #%u: member_replay_ok()\n", test); | 319 | "Test #%u: member_replay_ok()\n", test); |
@@ -380,7 +380,7 @@ origin_recv_replay_frag (void *cls, | |||
380 | switch (test) | 380 | switch (test) |
381 | { | 381 | { |
382 | case TEST_MEMBER_REPLAY_ERROR: | 382 | case TEST_MEMBER_REPLAY_ERROR: |
383 | // Test 8 starts here | 383 | // Test 8 starts here |
384 | GNUNET_MULTICAST_replay_response (rh, NULL, GNUNET_SYSERR); | 384 | GNUNET_MULTICAST_replay_response (rh, NULL, GNUNET_SYSERR); |
385 | member_replay_ok (); | 385 | member_replay_ok (); |
386 | break; | 386 | break; |
@@ -440,11 +440,11 @@ origin_recv_request (void *cls, | |||
440 | &member_pub_key, sizeof (member_pub_key))); | 440 | &member_pub_key, sizeof (member_pub_key))); |
441 | 441 | ||
442 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 442 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
443 | "Test #%u: verify message content, take first 3 bytes: %.3s\n", | 443 | "Test #%u: verify message content, take first 3 bytes: %.3s\n", |
444 | test, (char *)&req[1]); | 444 | test, (char *)&req[1]); |
445 | GNUNET_assert (0 == memcmp (&req[1], "abc", 3)); | 445 | GNUNET_assert (0 == memcmp (&req[1], "abc", 3)); |
446 | 446 | ||
447 | // Test 7 starts here | 447 | // Test 7 starts here |
448 | member_replay_error (); | 448 | member_replay_error (); |
449 | } | 449 | } |
450 | 450 | ||
@@ -497,7 +497,7 @@ member_recv_message (void *cls, | |||
497 | break; | 497 | break; |
498 | 498 | ||
499 | case TEST_MEMBER_REPLAY_OK: | 499 | case TEST_MEMBER_REPLAY_OK: |
500 | // Test 9 starts here | 500 | // Test 9 starts here |
501 | GNUNET_assert (replay_fragment_id == GNUNET_ntohll (msg->fragment_id)); | 501 | GNUNET_assert (replay_fragment_id == GNUNET_ntohll (msg->fragment_id)); |
502 | member_part (); | 502 | member_part (); |
503 | break; | 503 | break; |
@@ -585,14 +585,14 @@ member_recv_join_decision (void *cls, | |||
585 | { | 585 | { |
586 | case TEST_MEMBER_JOIN_REFUSE: | 586 | case TEST_MEMBER_JOIN_REFUSE: |
587 | GNUNET_assert (0 == relay_count); | 587 | GNUNET_assert (0 == relay_count); |
588 | // Test 3 starts here | 588 | // Test 3 starts here |
589 | GNUNET_SCHEDULER_add_now (&schedule_member_part, NULL); | 589 | GNUNET_SCHEDULER_add_now (&schedule_member_part, NULL); |
590 | break; | 590 | break; |
591 | 591 | ||
592 | case TEST_MEMBER_JOIN_ADMIT: | 592 | case TEST_MEMBER_JOIN_ADMIT: |
593 | GNUNET_assert (1 == relay_count); | 593 | GNUNET_assert (1 == relay_count); |
594 | GNUNET_assert (0 == memcmp (relays, &this_peer, sizeof (this_peer))); | 594 | GNUNET_assert (0 == memcmp (relays, &this_peer, sizeof (this_peer))); |
595 | // Test 4 starts here | 595 | // Test 4 starts here |
596 | origin_to_all (); | 596 | origin_to_all (); |
597 | break; | 597 | break; |
598 | 598 | ||
@@ -630,7 +630,7 @@ origin_recv_join_request (void *cls, | |||
630 | switch (test) | 630 | switch (test) |
631 | { | 631 | { |
632 | case TEST_MEMBER_JOIN_REFUSE: | 632 | case TEST_MEMBER_JOIN_REFUSE: |
633 | // Test 3 starts here | 633 | // Test 3 starts here |
634 | GNUNET_MULTICAST_join_decision (jh, GNUNET_NO, 0, NULL, join_resp); | 634 | GNUNET_MULTICAST_join_decision (jh, GNUNET_NO, 0, NULL, join_resp); |
635 | break; | 635 | break; |
636 | 636 | ||
@@ -680,7 +680,7 @@ member_join (int t) | |||
680 | &member_cls); | 680 | &member_cls); |
681 | } | 681 | } |
682 | 682 | ||
683 | /** | 683 | /** |
684 | * Test: Start a multicast group as origin | 684 | * Test: Start a multicast group as origin |
685 | */ | 685 | */ |
686 | static void | 686 | static void |
@@ -709,7 +709,7 @@ static void | |||
709 | core_connected (void *cls, const struct GNUNET_PeerIdentity *my_identity) | 709 | core_connected (void *cls, const struct GNUNET_PeerIdentity *my_identity) |
710 | { | 710 | { |
711 | this_peer = *my_identity; | 711 | this_peer = *my_identity; |
712 | 712 | ||
713 | // Test 1 starts here | 713 | // Test 1 starts here |
714 | origin_start (); | 714 | origin_start (); |
715 | } | 715 | } |