gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r36154 - gnunet/src/rps
Date: Fri, 31 Jul 2015 13:20:05 +0200

Author: harsha
Date: 2015-07-31 13:20:05 +0200 (Fri, 31 Jul 2015)
New Revision: 36154

Modified:
   gnunet/src/rps/test_rps.c
Log:
stop asking for random peers if we are shutting down

Modified: gnunet/src/rps/test_rps.c
===================================================================
--- gnunet/src/rps/test_rps.c   2015-07-31 11:18:36 UTC (rev 36153)
+++ gnunet/src/rps/test_rps.c   2015-07-31 11:20:05 UTC (rev 36154)
@@ -46,7 +46,6 @@
 //#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
 static struct GNUNET_TIME_Relative timeout;
 
-
 /**
  * Portion of malicious peers
  */
@@ -260,6 +259,10 @@
   uint32_t num_requests;
 } cur_test_run;
 
+/**
+ * Are we shutting down?
+ */
+static int in_shutdown;
 
 /**
  * Append arguments to file
@@ -476,6 +479,7 @@
 {
   unsigned int i;
 
+  in_shutdown = GNUNET_YES;
   if (NULL != churn_task)
     GNUNET_SCHEDULER_cancel (churn_task);
 
@@ -625,7 +629,7 @@
  */
 static void
 rps_disconnect_adapter (void *cls,
-                                         void *op_result)
+                        void *op_result)
 {
   struct GNUNET_RPS_Handle *h = op_result;
   GNUNET_RPS_disconnect (h);
@@ -689,6 +693,8 @@
 {
   struct RPSPeer *rps_peer = (struct RPSPeer *) cls;
 
+  if (GNUNET_YES == in_shutdown)
+    return;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Requesting one peer\n");
 




reply via email to

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