diff options
author | Bart Polot <bart@net.in.tum.de> | 2015-06-25 03:32:25 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2015-06-25 03:32:25 +0000 |
commit | f4f0fc75d3b88b492deab41df0a9a3bc7902027c (patch) | |
tree | bc9aa10413c4d43f9ef2c2ce7095f5218d926497 /src | |
parent | 6b412abd1892df726b73837676d03990705f4ea7 (diff) |
- destroy queued messages only after making sure no channels have handles to them
Diffstat (limited to 'src')
-rw-r--r-- | src/cadet/gnunet-service-cadet_tunnel.c | 10 |
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) GNUNET_CONTAINER_multipeermap_remove (tunnels, GCP_get_id (t->peer), t)); - while (NULL != t->tq_head) - unqueue_data (t->tq_head); - for (iter_c = t->connection_head; NULL != iter_c; iter_c = next_c) { next_c = iter_c->next; @@ -3671,6 +3668,13 @@ GCT_destroy (struct CadetTunnel *t) GCCH_destroy (iter_ch->ch); /* Should only happen on shutdown, but it's ok. */ } + while (NULL != t->tq_head) + { + /* Should have been cleaned by destuction of channel. */ + GNUNET_break (0); + unqueue_data (t->tq_head); + } + if (NULL != t->destroy_task) { |