gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 01/02: RPS test: Add another group for sub test


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 01/02: RPS test: Add another group for sub test
Date: Sun, 14 Oct 2018 10:07:15 +0200

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

julius-buenger pushed a commit to branch master
in repository gnunet.

commit 6ebd7d015990554594f5668cdccc4fe2da629fbf
Author: Julius Bünger <address@hidden>
AuthorDate: Sun Oct 14 10:04:13 2018 +0200

    RPS test: Add another group for sub test
---
 src/rps/test_rps.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c
index f26a9d424..1c98a1e5e 100644
--- a/src/rps/test_rps.c
+++ b/src/rps/test_rps.c
@@ -1578,6 +1578,14 @@ got_stream_peer_cb (void *cls,
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Received a peer id outside 
sub\n");
       ok = 1;
     }
+    else if (0 == rps_peer->index &&
+             0 != memcmp (&peers[i],
+                          &rps_peers[0].peer_id,
+                          sizeof (struct GNUNET_PeerIdentity)))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Received a peer id outside sub 
(lonely)\n");
+      ok = 1;
+    }
   }
 }
 
@@ -1586,14 +1594,17 @@ static void
 sub_post (struct RPSPeer *rps_peer)
 {
   if (0 != rps_peer->index) GNUNET_RPS_sub_stop (rps_peer->rps_handle, "test");
+  else GNUNET_RPS_sub_stop (rps_peer->rps_handle, "lonely");
 }
 
+
 static void
 sub_pre (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h)
 {
   (void) rps_peer;
 
   if (0 != rps_peer->index) GNUNET_RPS_sub_start (h, "test");
+  else GNUNET_RPS_sub_start (h, "lonely"); /* have a group of one */
   rps_peer->rps_srh = GNUNET_RPS_stream_request (h,
                                                  0,
                                                  &got_stream_peer_cb,

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



reply via email to

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