aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_tunnel.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-06-25 03:32:25 +0000
committerBart Polot <bart@net.in.tum.de>2015-06-25 03:32:25 +0000
commitf4f0fc75d3b88b492deab41df0a9a3bc7902027c (patch)
treebc9aa10413c4d43f9ef2c2ce7095f5218d926497 /src/cadet/gnunet-service-cadet_tunnel.c
parent6b412abd1892df726b73837676d03990705f4ea7 (diff)
downloadgnunet-f4f0fc75d3b88b492deab41df0a9a3bc7902027c.tar.gz
gnunet-f4f0fc75d3b88b492deab41df0a9a3bc7902027c.zip
- destroy queued messages only after making sure no channels have handles to them
Diffstat (limited to 'src/cadet/gnunet-service-cadet_tunnel.c')
-rw-r--r--src/cadet/gnunet-service-cadet_tunnel.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c
index 422a1649e..6cda9f7ff 100644
--- a/src/cadet/gnunet-service-cadet_tunnel.c
+++ b/src/cadet/gnunet-service-cadet_tunnel.c
@@ -3657,9 +3657,6 @@ GCT_destroy (struct CadetTunnel *t)
3657 GNUNET_CONTAINER_multipeermap_remove (tunnels, 3657 GNUNET_CONTAINER_multipeermap_remove (tunnels,
3658 GCP_get_id (t->peer), t)); 3658 GCP_get_id (t->peer), t));
3659 3659
3660 while (NULL != t->tq_head)
3661 unqueue_data (t->tq_head);
3662
3663 for (iter_c = t->connection_head; NULL != iter_c; iter_c = next_c) 3660 for (iter_c = t->connection_head; NULL != iter_c; iter_c = next_c)
3664 { 3661 {
3665 next_c = iter_c->next; 3662 next_c = iter_c->next;
@@ -3671,6 +3668,13 @@ GCT_destroy (struct CadetTunnel *t)
3671 GCCH_destroy (iter_ch->ch); 3668 GCCH_destroy (iter_ch->ch);
3672 /* Should only happen on shutdown, but it's ok. */ 3669 /* Should only happen on shutdown, but it's ok. */
3673 } 3670 }
3671 while (NULL != t->tq_head)
3672 {
3673 /* Should have been cleaned by destuction of channel. */
3674 GNUNET_break (0);
3675 unqueue_data (t->tq_head);
3676 }
3677
3674 3678
3675 if (NULL != t->destroy_task) 3679 if (NULL != t->destroy_task)
3676 { 3680 {