aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet_dht_profiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/gnunet_dht_profiler.c')
-rw-r--r--src/dht/gnunet_dht_profiler.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/dht/gnunet_dht_profiler.c b/src/dht/gnunet_dht_profiler.c
index a9c84b723..b95239f32 100644
--- a/src/dht/gnunet_dht_profiler.c
+++ b/src/dht/gnunet_dht_profiler.c
@@ -385,21 +385,23 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
385 { 385 {
386 for (cnt=0; cnt < num_peers; cnt++) 386 for (cnt=0; cnt < num_peers; cnt++)
387 { 387 {
388 if (NULL != a_ctx[cnt].op)
389 GNUNET_TESTBED_operation_done (a_ctx[cnt].op); //FIXME: assertion fails.
390
391 /* Cleanup active context if this peer is an active peer */ 388 /* Cleanup active context if this peer is an active peer */
392 ac = a_ctx[cnt].ac; 389 ac = a_ctx[cnt].ac;
393 if (NULL == ac) 390 if (NULL != ac)
394 continue; 391 {
395 if (GNUNET_SCHEDULER_NO_TASK != ac->delay_task) 392 if (GNUNET_SCHEDULER_NO_TASK != ac->delay_task)
396 GNUNET_SCHEDULER_cancel (ac->delay_task); 393 GNUNET_SCHEDULER_cancel (ac->delay_task);
397 if (NULL != ac->put_data) 394 if (NULL != ac->put_data)
398 GNUNET_free (ac->put_data); 395 GNUNET_free (ac->put_data);
399 if (NULL != ac->dht_put) 396 if (NULL != ac->dht_put)
400 GNUNET_DHT_put_cancel (ac->dht_put); 397 GNUNET_DHT_put_cancel (ac->dht_put);
401 if (NULL != ac->dht_get) 398 if (NULL != ac->dht_get)
402 GNUNET_DHT_get_stop (ac->dht_get); 399 GNUNET_DHT_get_stop (ac->dht_get);
400 }
401 /* Cleanup testbed operation handle at the last as this operation may
402 contain service connection to DHT */
403 if (NULL != a_ctx[cnt].op)
404 GNUNET_TESTBED_operation_done (a_ctx[cnt].op);
403 } 405 }
404 GNUNET_free (a_ctx); 406 GNUNET_free (a_ctx);
405 a_ctx = NULL; 407 a_ctx = NULL;