From 1bf6980ae91b29a2c7444f05bf4a51e649aecfc5 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 17 Mar 2014 11:02:40 +0000 Subject: [PATCH] - fix operation handling --- src/mesh/gnunet-mesh-profiler.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mesh/gnunet-mesh-profiler.c b/src/mesh/gnunet-mesh-profiler.c index ec2d64606..928c1dfed 100644 --- a/src/mesh/gnunet-mesh-profiler.c +++ b/src/mesh/gnunet-mesh-profiler.c @@ -247,7 +247,8 @@ disconnect_mesh_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) disconnect_task = GNUNET_SCHEDULER_NO_TASK; for (i = 0; i < TOTAL_PEERS; i++) { - GNUNET_TESTBED_operation_done (peers[i].op); + if (NULL != peers[i].op) + GNUNET_TESTBED_operation_done (peers[i].op); if (peers[i].up != GNUNET_YES) continue; @@ -675,7 +676,7 @@ channel_cleaner (void *cls, const struct GNUNET_MESH_Channel *channel, struct MeshPeer *peer = &peers[n]; GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Incoming channel %p disconnected at peer %ld\n", channel, n); + "Channel %p disconnected at peer %ld\n", channel, n); if (peer->ch == channel) peer->ch = NULL; } @@ -768,6 +769,10 @@ peer_id_cb (void *cls, GNUNET_break (GNUNET_OK == GNUNET_CONTAINER_multipeermap_put (ids, &peers[n].id, &peers[n], GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)); + + GNUNET_TESTBED_operation_done (peers[n].op); + peers[n].op = NULL; + p_ids++; if (p_ids < TOTAL_PEERS) return; -- 2.25.1