aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-04-10 11:23:32 +0000
committerBart Polot <bart@net.in.tum.de>2014-04-10 11:23:32 +0000
commit39a795720906566f132017a3db4c1daf223019c5 (patch)
tree4d119dffe29d0153d2f6096f15b65fc5f3833df3 /src
parent6000665d4e09b24b47f43b2ff3d60a92872f6aa4 (diff)
downloadgnunet-39a795720906566f132017a3db4c1daf223019c5.tar.gz
gnunet-39a795720906566f132017a3db4c1daf223019c5.zip
- don't cancel a connection's destroy message when destroying a connection and canceling all its traffic. since the connection will be freed, remove the connection pointer instead
Diffstat (limited to 'src')
-rw-r--r--src/mesh/gnunet-service-mesh_peer.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c
index bc8f0269c..a98bf568f 100644
--- a/src/mesh/gnunet-service-mesh_peer.c
+++ b/src/mesh/gnunet-service-mesh_peer.c
@@ -1189,8 +1189,15 @@ GMP_queue_cancel (struct MeshPeer *peer, struct MeshConnection *c)
1189 prev = q->prev; 1189 prev = q->prev;
1190 if (q->c == c) 1190 if (q->c == c)
1191 { 1191 {
1192 LOG (GNUNET_ERROR_TYPE_DEBUG, "GMP_cancel_queue %s\n", GM_m2s (q->type)); 1192 LOG (GNUNET_ERROR_TYPE_DEBUG, "GMP queue cancel %s\n", GM_m2s (q->type));
1193 GMP_queue_destroy (q, GNUNET_YES, GNUNET_NO); 1193 if (GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY != q->type)
1194 {
1195 q->c = NULL;
1196 }
1197 else
1198 {
1199 GMP_queue_destroy (q, GNUNET_YES, GNUNET_NO);
1200 }
1194 1201
1195 /* Get next from prev, q->next might be already freed: 1202 /* Get next from prev, q->next might be already freed:
1196 * queue destroy -> callback -> GMC_destroy -> cancel_queues -> here 1203 * queue destroy -> callback -> GMC_destroy -> cancel_queues -> here