aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-service-mesh_tunnel.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-12-17 04:19:11 +0000
committerBart Polot <bart@net.in.tum.de>2013-12-17 04:19:11 +0000
commit74ba25a59e66634b15d0a34e20f9889cff86ffae (patch)
treeff96d07bc907abec333a357231f8cb1c57773210 /src/mesh/gnunet-service-mesh_tunnel.c
parent69810e537ec74fff07742ca476d0897f7d4a4b30 (diff)
downloadgnunet-74ba25a59e66634b15d0a34e20f9889cff86ffae.tar.gz
gnunet-74ba25a59e66634b15d0a34e20f9889cff86ffae.zip
-call GMT_sent when canceling tunneled buffered messages before the KX completes
Diffstat (limited to 'src/mesh/gnunet-service-mesh_tunnel.c')
-rw-r--r--src/mesh/gnunet-service-mesh_tunnel.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c
index c3a0166a2..7cfe985f1 100644
--- a/src/mesh/gnunet-service-mesh_tunnel.c
+++ b/src/mesh/gnunet-service-mesh_tunnel.c
@@ -643,13 +643,13 @@ message_sent (void *cls,
643 * Delete a queued message: either was sent or the channel was destroyed 643 * Delete a queued message: either was sent or the channel was destroyed
644 * before the tunnel's key exchange had a chance to finish. 644 * before the tunnel's key exchange had a chance to finish.
645 * 645 *
646 * @param tq Queue handle. 646 * @param tqd Delayed queue handle.
647 */ 647 */
648static void 648static void
649unqueue_data (struct MeshTunnelDelayed *tq) 649unqueue_data (struct MeshTunnelDelayed *tqd)
650{ 650{
651 GNUNET_CONTAINER_DLL_remove (tq->t->tq_head, tq->t->tq_tail, tq); 651 GNUNET_CONTAINER_DLL_remove (tqd->t->tq_head, tqd->t->tq_tail, tqd);
652 GNUNET_free (tq); 652 GNUNET_free (tqd);
653} 653}
654 654
655 655
@@ -1150,7 +1150,7 @@ handle_data (struct MeshTunnel3 *t,
1150 { 1150 {
1151 GNUNET_STATISTICS_update (stats, "# data on unknown channel", 1151 GNUNET_STATISTICS_update (stats, "# data on unknown channel",
1152 1, GNUNET_NO); 1152 1, GNUNET_NO);
1153 LOG (GNUNET_ERROR_TYPE_DEBUG, "WARNING channel %X unknown\n", 1153 LOG (GNUNET_ERROR_TYPE_DEBUG, "WARNING channel 0x%X unknown\n",
1154 ntohl (msg->chid)); 1154 ntohl (msg->chid));
1155 return; 1155 return;
1156 } 1156 }
@@ -2357,6 +2357,10 @@ GMT_cancel (struct MeshTunnel3Queue *q)
2357 else if (NULL != q->tqd) 2357 else if (NULL != q->tqd)
2358 { 2358 {
2359 unqueue_data (q->tqd); 2359 unqueue_data (q->tqd);
2360 q->tqd = NULL;
2361 if (NULL != q->cont)
2362 q->cont (q->cont_cls, NULL, q, 0, 0);
2363 GNUNET_free (q);
2360 } 2364 }
2361 else 2365 else
2362 { 2366 {