gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r33961 - gnunet/src/dht
Date: Mon, 14 Jul 2014 14:20:23 +0200

Author: supriti
Date: 2014-07-14 14:20:23 +0200 (Mon, 14 Jul 2014)
New Revision: 33961

Modified:
   gnunet/src/dht/gnunet_dht_profiler.c
Log:
Close client connection to DHT once GET is succeeded or failed.


Modified: gnunet/src/dht/gnunet_dht_profiler.c
===================================================================
--- gnunet/src/dht/gnunet_dht_profiler.c        2014-07-14 12:03:35 UTC (rev 
33960)
+++ gnunet/src/dht/gnunet_dht_profiler.c        2014-07-14 12:20:23 UTC (rev 
33961)
@@ -263,15 +263,18 @@
 cancel_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct ActiveContext *ac = cls;
+  struct Context *ctx = ac->ctx;
 
   ac->delay_task = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_assert (NULL != ac->dht_get);
   GNUNET_DHT_get_stop (ac->dht_get);
   ac->dht_get = NULL;
+  GNUNET_TESTBED_operation_done (ctx->op);
+  ctx->op = NULL;
   n_gets_fail++;
 
   /* If profiling is complete, summarize */
-  if (n_gets == n_gets_fail + n_gets_ok)
+  if (n_active == n_gets_fail + n_gets_ok)
     summarize ();
 }
 
@@ -306,6 +309,7 @@
 {
   struct ActiveContext *ac = cls;
   struct ActiveContext *get_ac = ac->get_ac;
+  struct Context *ctx = ac->ctx;
 
   /* Check the keys of put and get match or not. */
   GNUNET_assert (0 == memcmp (key, &get_ac->hash, sizeof (struct 
GNUNET_HashCode)));
@@ -317,7 +321,9 @@
   ac->dht_get = NULL;
   GNUNET_SCHEDULER_cancel (ac->delay_task);
   ac->delay_task = GNUNET_SCHEDULER_NO_TASK;
-
+  GNUNET_TESTBED_operation_done (ctx->op);
+  ctx->op = NULL;
+  
   /* Summarize if profiling is complete */
   if (n_active == n_gets_fail + n_gets_ok)
     summarize ();




reply via email to

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