gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r34201 - gnunet/src/dht
Date: Fri, 22 Aug 2014 16:35:15 +0200

Author: harsha
Date: 2014-08-22 16:35:15 +0200 (Fri, 22 Aug 2014)
New Revision: 34201

Modified:
   gnunet/src/dht/gnunet_dht_profiler.c
Log:
Teardown DHT connection after clearing up the ActiveContext


Modified: gnunet/src/dht/gnunet_dht_profiler.c
===================================================================
--- gnunet/src/dht/gnunet_dht_profiler.c        2014-08-22 14:22:59 UTC (rev 
34200)
+++ gnunet/src/dht/gnunet_dht_profiler.c        2014-08-22 14:35:15 UTC (rev 
34201)
@@ -385,21 +385,23 @@
   {
     for (cnt=0; cnt < num_peers; cnt++)
     {
-      if (NULL != a_ctx[cnt].op)
-        GNUNET_TESTBED_operation_done (a_ctx[cnt].op); //FIXME: assertion 
fails.
-
       /* Cleanup active context if this peer is an active peer */
       ac = a_ctx[cnt].ac;
-      if (NULL == ac)
-        continue;
-      if (GNUNET_SCHEDULER_NO_TASK != ac->delay_task)
-        GNUNET_SCHEDULER_cancel (ac->delay_task);
-      if (NULL != ac->put_data)
-        GNUNET_free (ac->put_data);
-      if (NULL != ac->dht_put)
-        GNUNET_DHT_put_cancel (ac->dht_put);
-      if (NULL != ac->dht_get)
-        GNUNET_DHT_get_stop (ac->dht_get);
+      if (NULL != ac)
+      {
+        if (GNUNET_SCHEDULER_NO_TASK != ac->delay_task)
+          GNUNET_SCHEDULER_cancel (ac->delay_task);
+        if (NULL != ac->put_data)
+          GNUNET_free (ac->put_data);
+        if (NULL != ac->dht_put)
+          GNUNET_DHT_put_cancel (ac->dht_put);
+        if (NULL != ac->dht_get)
+          GNUNET_DHT_get_stop (ac->dht_get);
+      }
+      /* Cleanup testbed operation handle at the last as this operation may
+         contain service connection to DHT */
+      if (NULL != a_ctx[cnt].op)
+        GNUNET_TESTBED_operation_done (a_ctx[cnt].op);
     }
     GNUNET_free (a_ctx);
     a_ctx = NULL;




reply via email to

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