gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r35747 - gnunet/src/rps


From: gnunet
Subject: [GNUnet-SVN] r35747 - gnunet/src/rps
Date: Wed, 20 May 2015 00:41:22 +0200

Author: ch3
Date: 2015-05-20 00:41:22 +0200 (Wed, 20 May 2015)
New Revision: 35747

Modified:
   gnunet/src/rps/gnunet-service-rps.c
   gnunet/src/rps/gnunet-service-rps_sampler.c
   gnunet/src/rps/test_rps.c
Log:
-optical changes

Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2015-05-19 22:41:18 UTC (rev 35746)
+++ gnunet/src/rps/gnunet-service-rps.c 2015-05-19 22:41:22 UTC (rev 35747)
@@ -2048,27 +2048,28 @@
     GNUNET_array_grow (gossip_list, gossip_list_size, second_border);
 
     for (i = 0 ; i < first_border ; i++)
-    { // TODO use RPS_sampler_get_n_rand_peers
-      /* Update gossip list with peers received through PUSHes */
+    {/* Update gossip list with peers received through PUSHes */
       r_index = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_STRONG,
-                                       push_list_size);
+                                          push_list_size);
       gossip_list[i] = push_list[r_index];
       // TODO change the peer_flags accordingly
     }
 
     for (i = first_border ; i < second_border ; i++)
-    {
-      /* Update gossip list with peers received through PULLs */
+    {/* Update gossip list with peers received through PULLs */
       r_index = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_STRONG,
-                                       pull_list_size);
+                                          pull_list_size);
       gossip_list[i] = pull_list[r_index];
       // TODO change the peer_flags accordingly
     }
 
     for (i = second_border ; i < sampler_size_est_need ; i++)
-    {
-      /* Update gossip list with peers from history */
-      RPS_sampler_get_n_rand_peers (prot_sampler, hist_update, NULL, 1, 
GNUNET_NO);
+    {/* Update gossip list with peers from history */
+      RPS_sampler_get_n_rand_peers (prot_sampler,
+                                    hist_update,
+                                    NULL,
+                                    1,
+                                    GNUNET_NO);
       num_hist_update_tasks++;
       // TODO change the peer_flags accordingly
     }

Modified: gnunet/src/rps/gnunet-service-rps_sampler.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps_sampler.c 2015-05-19 22:41:18 UTC (rev 
35746)
+++ gnunet/src/rps/gnunet-service-rps_sampler.c 2015-05-19 22:41:22 UTC (rev 
35747)
@@ -644,7 +644,7 @@
  */
 struct RPS_Sampler *
 RPS_sampler_init (size_t init_size,
-    struct GNUNET_TIME_Relative max_round_interval)
+                  struct GNUNET_TIME_Relative max_round_interval)
 {
   struct RPS_Sampler *sampler;
   //uint32_t i;

Modified: gnunet/src/rps/test_rps.c
===================================================================
--- gnunet/src/rps/test_rps.c   2015-05-19 22:41:18 UTC (rev 35746)
+++ gnunet/src/rps/test_rps.c   2015-05-19 22:41:22 UTC (rev 35747)
@@ -318,7 +318,10 @@
 {
   unsigned int i;
 
-  for (i=0;i<NUM_PEERS;i++)
+  if (NULL != churn_task)
+    GNUNET_SCHEDULER_cancel (churn_task);
+
+  for (i = 0 ; i < num_peers ; i++)
     GNUNET_TESTBED_operation_done (rps_peers[i].op);
   GNUNET_SCHEDULER_shutdown ();
 }




reply via email to

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