gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] 60/64: actually test reconnecting; result in enter


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 60/64: actually test reconnecting; result in enter callback must always be GNUNET_OK
Date: Sat, 30 Dec 2017 20:58:45 +0100

This is an automated email from the git hooks/post-receive script.

lurchi pushed a commit to branch master
in repository gnunet.

commit cc77132e6ab0b35c3ecad0b3ca99a79662778ece
Author: lurchi <address@hidden>
AuthorDate: Sat Dec 30 18:52:01 2017 +0100

    actually test reconnecting; result in enter callback must always be 
GNUNET_OK
---
 src/social/test_social.c | 12 ++++++------
 1 file 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
 schedule_reconnect (void *cls)
 {
   test = TEST_RECONNECT;
-
   GNUNET_SOCIAL_host_disconnect (hst, NULL, NULL);
   GNUNET_SOCIAL_guest_disconnect (gst, NULL, NULL);
   hst = NULL;
@@ -624,7 +623,7 @@ guest_left (void *cls)
 
 
 static void
-guest_leave()
+guest_leave ()
 {
   if (test < TEST_RECONNECT)
     test = TEST_GUEST_LEAVE;
@@ -1108,7 +1107,8 @@ guest_recv_entry_decision (void *cls,
   {
   case TEST_GUEST_RECV_ENTRY_DCSN_REFUSE:
     GNUNET_assert (GNUNET_NO == is_admitted);
-    guest_enter ();
+    test = TEST_HOST_ANSWER_DOOR_ADMIT;
+    GNUNET_SOCIAL_guest_disconnect (gst, &guest_enter, NULL);
     break;
 
   case TEST_GUEST_RECV_ENTRY_DCSN_ADMIT:
@@ -1158,7 +1158,7 @@ host_answer_door (void *cls,
     // fall through
 
   case TEST_GUEST_ENTER_BY_NAME:
-    join_resp = GNUNET_PSYC_message_create ("_notice_place_admit", env,
+   join_resp = GNUNET_PSYC_message_create ("_notice_place_admit", env,
                                             DATA2ARG ("Welcome, nym!"));
     GNUNET_SOCIAL_host_entry_decision (hst, nym, GNUNET_YES, join_resp);
     break;
@@ -1178,7 +1178,7 @@ guest_recv_local_enter (void *cls, int result,
   GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
               "Test #%u: Guest entered local place: %d\n",
               test, result);
-  GNUNET_assert (0 <= result);
+  GNUNET_assert (GNUNET_OK == result);
 }
 
 
@@ -1262,7 +1262,7 @@ guest_init ()
                                  guest_recv_data, guest_recv_eom, NULL);
   GNUNET_PSYC_slicer_modifier_add (guest_slicer, "_foo_bar",
                                    guest_recv_mod_foo_bar, &mod_foo_bar_rcls);
-  test = TEST_HOST_ANSWER_DOOR_ADMIT;
+  test = TEST_HOST_ANSWER_DOOR_REFUSE;
 
   GNUNET_SOCIAL_zone_add_nym (app, guest_ego, "host", host_pub_key,
                               GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_MINUTES),

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]