gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r34185 - gnunet/src/dht
Date: Wed, 20 Aug 2014 16:24:49 +0200

Author: harsha
Date: 2014-08-20 16:24:48 +0200 (Wed, 20 Aug 2014)
New Revision: 34185

Modified:
   gnunet/src/dht/gnunet_dht_profiler.c
Log:
Change the mode in DHT disconnect handler.


Modified: gnunet/src/dht/gnunet_dht_profiler.c
===================================================================
--- gnunet/src/dht/gnunet_dht_profiler.c        2014-08-20 14:11:29 UTC (rev 
34184)
+++ gnunet/src/dht/gnunet_dht_profiler.c        2014-08-20 14:24:48 UTC (rev 
34185)
@@ -638,12 +638,7 @@
     n_puts_fail++;
   GNUNET_assert (NULL != ctx);
   GNUNET_TESTBED_operation_done (ctx->op);
-  /* Start GETs if all PUTs have been made */
-  if (n_active == n_puts_ok + n_puts_fail)
-  {
-    mode = MODE_GET;
-    start_profiling ();
-  }
+  ctx->op = NULL;
 }
 
 
@@ -755,8 +750,16 @@
   GNUNET_assert (ac->dht == op_result);
   GNUNET_DHT_disconnect (ac->dht);
   n_dht--;
-  if (0 == n_dht)
-    GNUNET_SCHEDULER_shutdown ();
+  if (0 != n_dht)
+    return;
+  /* Start GETs if all PUTs have been made */
+  if (MODE_PUT == mode)
+  {
+    mode = MODE_GET;
+    start_profiling ();
+    return;
+  }
+  GNUNET_SCHEDULER_shutdown ();
 }
 
 




reply via email to

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