diff options
author | lurchi <lurchi@strangeplace.net> | 2017-12-30 18:52:01 +0100 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2017-12-30 18:52:01 +0100 |
commit | cc77132e6ab0b35c3ecad0b3ca99a79662778ece (patch) | |
tree | fa0c4cae66d08f58f93abd781eb5a58740e7d1ff /src/social | |
parent | af9ae1f37cbd418abd14f1fab0bb10210f68fefa (diff) | |
download | gnunet-cc77132e6ab0b35c3ecad0b3ca99a79662778ece.tar.gz gnunet-cc77132e6ab0b35c3ecad0b3ca99a79662778ece.zip |
actually test reconnecting; result in enter callback must always be GNUNET_OK
Diffstat (limited to 'src/social')
-rw-r--r-- | src/social/test_social.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/social/test_social.c b/src/social/test_social.c index de2299320..61dbd121c 100644 --- a/src/social/test_social.c +++ b/src/social/test_social.c | |||
@@ -544,7 +544,6 @@ static void | |||
544 | schedule_reconnect (void *cls) | 544 | schedule_reconnect (void *cls) |
545 | { | 545 | { |
546 | test = TEST_RECONNECT; | 546 | test = TEST_RECONNECT; |
547 | |||
548 | GNUNET_SOCIAL_host_disconnect (hst, NULL, NULL); | 547 | GNUNET_SOCIAL_host_disconnect (hst, NULL, NULL); |
549 | GNUNET_SOCIAL_guest_disconnect (gst, NULL, NULL); | 548 | GNUNET_SOCIAL_guest_disconnect (gst, NULL, NULL); |
550 | hst = NULL; | 549 | hst = NULL; |
@@ -624,7 +623,7 @@ guest_left (void *cls) | |||
624 | 623 | ||
625 | 624 | ||
626 | static void | 625 | static void |
627 | guest_leave() | 626 | guest_leave () |
628 | { | 627 | { |
629 | if (test < TEST_RECONNECT) | 628 | if (test < TEST_RECONNECT) |
630 | test = TEST_GUEST_LEAVE; | 629 | test = TEST_GUEST_LEAVE; |
@@ -1108,7 +1107,8 @@ guest_recv_entry_decision (void *cls, | |||
1108 | { | 1107 | { |
1109 | case TEST_GUEST_RECV_ENTRY_DCSN_REFUSE: | 1108 | case TEST_GUEST_RECV_ENTRY_DCSN_REFUSE: |
1110 | GNUNET_assert (GNUNET_NO == is_admitted); | 1109 | GNUNET_assert (GNUNET_NO == is_admitted); |
1111 | guest_enter (); | 1110 | test = TEST_HOST_ANSWER_DOOR_ADMIT; |
1111 | GNUNET_SOCIAL_guest_disconnect (gst, &guest_enter, NULL); | ||
1112 | break; | 1112 | break; |
1113 | 1113 | ||
1114 | case TEST_GUEST_RECV_ENTRY_DCSN_ADMIT: | 1114 | case TEST_GUEST_RECV_ENTRY_DCSN_ADMIT: |
@@ -1158,7 +1158,7 @@ host_answer_door (void *cls, | |||
1158 | // fall through | 1158 | // fall through |
1159 | 1159 | ||
1160 | case TEST_GUEST_ENTER_BY_NAME: | 1160 | case TEST_GUEST_ENTER_BY_NAME: |
1161 | join_resp = GNUNET_PSYC_message_create ("_notice_place_admit", env, | 1161 | join_resp = GNUNET_PSYC_message_create ("_notice_place_admit", env, |
1162 | DATA2ARG ("Welcome, nym!")); | 1162 | DATA2ARG ("Welcome, nym!")); |
1163 | GNUNET_SOCIAL_host_entry_decision (hst, nym, GNUNET_YES, join_resp); | 1163 | GNUNET_SOCIAL_host_entry_decision (hst, nym, GNUNET_YES, join_resp); |
1164 | break; | 1164 | break; |
@@ -1178,7 +1178,7 @@ guest_recv_local_enter (void *cls, int result, | |||
1178 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, | 1178 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
1179 | "Test #%u: Guest entered local place: %d\n", | 1179 | "Test #%u: Guest entered local place: %d\n", |
1180 | test, result); | 1180 | test, result); |
1181 | GNUNET_assert (0 <= result); | 1181 | GNUNET_assert (GNUNET_OK == result); |
1182 | } | 1182 | } |
1183 | 1183 | ||
1184 | 1184 | ||
@@ -1262,7 +1262,7 @@ guest_init () | |||
1262 | guest_recv_data, guest_recv_eom, NULL); | 1262 | guest_recv_data, guest_recv_eom, NULL); |
1263 | GNUNET_PSYC_slicer_modifier_add (guest_slicer, "_foo_bar", | 1263 | GNUNET_PSYC_slicer_modifier_add (guest_slicer, "_foo_bar", |
1264 | guest_recv_mod_foo_bar, &mod_foo_bar_rcls); | 1264 | guest_recv_mod_foo_bar, &mod_foo_bar_rcls); |
1265 | test = TEST_HOST_ANSWER_DOOR_ADMIT; | 1265 | test = TEST_HOST_ANSWER_DOOR_REFUSE; |
1266 | 1266 | ||
1267 | GNUNET_SOCIAL_zone_add_nym (app, guest_ego, "host", host_pub_key, | 1267 | GNUNET_SOCIAL_zone_add_nym (app, guest_ego, "host", host_pub_key, |
1268 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES), | 1268 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES), |