commit 1bf6980ae91b29a2c7444f05bf4a51e649aecfc5
parent 5b7771ce97e79d7536e6a4256e0e7eb7a1d241d2
Author: Bart Polot <bart@net.in.tum.de>
Date: Mon, 17 Mar 2014 11:02:40 +0000
- fix operation handling
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git 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;