gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r34202 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r34202 - gnunet/src/dht
Date: Fri, 22 Aug 2014 16:37:40 +0200

Author: harsha
Date: 2014-08-22 16:37:39 +0200 (Fri, 22 Aug 2014)
New Revision: 34202

Modified:
   gnunet/src/dht/gnunet_dht_profiler.c
Log:
Do not continue if we are going to shutdown.


Modified: gnunet/src/dht/gnunet_dht_profiler.c
===================================================================
--- gnunet/src/dht/gnunet_dht_profiler.c        2014-08-22 14:35:15 UTC (rev 
34201)
+++ gnunet/src/dht/gnunet_dht_profiler.c        2014-08-22 14:37:39 UTC (rev 
34202)
@@ -349,7 +349,6 @@
  */
 static int peers_started = 0;
 
-
 /**
  * Should we do a PUT (mode = 0) or GET (mode = 1);
  */
@@ -360,7 +359,13 @@
   MODE_GET = 1
 } mode;
 
+
 /**
+ * Are we shutting down
+ */
+static int in_shutdown = 0;
+
+/**
  * Task that collects successor statistics from all the peers. 
  * @param cls
  * @param tc
@@ -381,6 +386,7 @@
   struct ActiveContext *ac;
   unsigned int cnt;
 
+  in_shutdown = GNUNET_YES;
   if (NULL != a_ctx)
   {
     for (cnt=0; cnt < num_peers; cnt++)
@@ -786,6 +792,8 @@
   n_dht--;
   if (0 != n_dht)
     return;
+  if (GNUNET_YES == in_shutdown)
+    return;
   switch (mode)
   {
   case MODE_PUT:
@@ -815,6 +823,7 @@
   unsigned int i;
 
   DEBUG("GNUNET_TESTBED_service_connect \n");
+  GNUNET_break (GNUNET_YES != in_shutdown);
   for(i = 0; i < n_active; i++)
   {
     struct ActiveContext *ac = &a_ac[i];




reply via email to

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