gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 05/06: Fix condition for returning peer from sampl


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 05/06: Fix condition for returning peer from sampler element
Date: Wed, 29 Aug 2018 15:43:49 +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 970e25512e192ee37d952b97394c14828672edcd
Author: Julius Bünger <address@hidden>
AuthorDate: Wed Aug 29 15:42:19 2018 +0200

    Fix condition for returning peer from sampler element
---
 src/rps/gnunet-service-rps_sampler.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/rps/gnunet-service-rps_sampler.c 
b/src/rps/gnunet-service-rps_sampler.c
index 6129f1b5b..53d982621 100644
--- a/src/rps/gnunet-service-rps_sampler.c
+++ b/src/rps/gnunet-service-rps_sampler.c
@@ -633,18 +633,19 @@ sampler_mod_get_rand_peer (void *cls)
                                       cls);
       return;
     }
-    else if (2 < s_elem->num_peers)
-    {
-      LOG (GNUNET_ERROR_TYPE_DEBUG,
-          "This s_elem saw less than two peers -- scheduling for later\n");
-      GNUNET_assert (NULL == gpc->get_peer_task);
-      gpc->get_peer_task =
-        GNUNET_SCHEDULER_add_delayed (sampler->max_round_interval,
-                                      &sampler_mod_get_rand_peer,
-                                      cls);
-    }
-    /* More reasons to wait could be added here */
   }
+  if (2 > s_elem->num_peers)
+  {
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+        "This s_elem saw less than two peers -- scheduling for later\n");
+    GNUNET_assert (NULL == gpc->get_peer_task);
+    gpc->get_peer_task =
+      GNUNET_SCHEDULER_add_delayed (sampler->max_round_interval,
+                                    &sampler_mod_get_rand_peer,
+                                    cls);
+    return;
+  }
+  /* More reasons to wait could be added here */
 
   GNUNET_STATISTICS_set (stats,
                          "# client sampler element input",

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



reply via email to

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