diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-03-17 11:02:40 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-03-17 11:02:40 +0000 |
commit | 1bf6980ae91b29a2c7444f05bf4a51e649aecfc5 (patch) | |
tree | 5b8aa549deb7c3b29891220376d95e4a06ae776d /src | |
parent | 5b7771ce97e79d7536e6a4256e0e7eb7a1d241d2 (diff) | |
download | gnunet-1bf6980ae91b29a2c7444f05bf4a51e649aecfc5.tar.gz gnunet-1bf6980ae91b29a2c7444f05bf4a51e649aecfc5.zip |
- fix operation handling
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-mesh-profiler.c | 9 |
1 files 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) | |||
247 | disconnect_task = GNUNET_SCHEDULER_NO_TASK; | 247 | disconnect_task = GNUNET_SCHEDULER_NO_TASK; |
248 | for (i = 0; i < TOTAL_PEERS; i++) | 248 | for (i = 0; i < TOTAL_PEERS; i++) |
249 | { | 249 | { |
250 | GNUNET_TESTBED_operation_done (peers[i].op); | 250 | if (NULL != peers[i].op) |
251 | GNUNET_TESTBED_operation_done (peers[i].op); | ||
251 | 252 | ||
252 | if (peers[i].up != GNUNET_YES) | 253 | if (peers[i].up != GNUNET_YES) |
253 | continue; | 254 | continue; |
@@ -675,7 +676,7 @@ channel_cleaner (void *cls, const struct GNUNET_MESH_Channel *channel, | |||
675 | struct MeshPeer *peer = &peers[n]; | 676 | struct MeshPeer *peer = &peers[n]; |
676 | 677 | ||
677 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 678 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
678 | "Incoming channel %p disconnected at peer %ld\n", channel, n); | 679 | "Channel %p disconnected at peer %ld\n", channel, n); |
679 | if (peer->ch == channel) | 680 | if (peer->ch == channel) |
680 | peer->ch = NULL; | 681 | peer->ch = NULL; |
681 | } | 682 | } |
@@ -768,6 +769,10 @@ peer_id_cb (void *cls, | |||
768 | GNUNET_break (GNUNET_OK == | 769 | GNUNET_break (GNUNET_OK == |
769 | GNUNET_CONTAINER_multipeermap_put (ids, &peers[n].id, &peers[n], | 770 | GNUNET_CONTAINER_multipeermap_put (ids, &peers[n].id, &peers[n], |
770 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)); | 771 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)); |
772 | |||
773 | GNUNET_TESTBED_operation_done (peers[n].op); | ||
774 | peers[n].op = NULL; | ||
775 | |||
771 | p_ids++; | 776 | p_ids++; |
772 | if (p_ids < TOTAL_PEERS) | 777 | if (p_ids < TOTAL_PEERS) |
773 | return; | 778 | return; |