From af07bc33ad882cf6fcdc2df97a6bf950755916f7 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 21 Oct 2013 15:25:19 +0000 Subject: - debug --- src/mesh/gnunet-service-mesh_tunnel.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c index 6d3c4c6e7..59df2ee81 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.c +++ b/src/mesh/gnunet-service-mesh_tunnel.c @@ -792,14 +792,22 @@ void GMT_remove_channel (struct MeshTunnel3 *t, struct MeshChannel *ch) { struct MeshTChannel *aux; + struct MeshTChannel *next; - for (aux = t->channel_head; aux != NULL; aux = aux->next) + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Removing channel %p from tunnel %p\n", + ch, t); + for (aux = t->channel_head; aux != NULL; aux = next) + { + next = aux->next; if (aux->ch == ch) { + LOG (GNUNET_ERROR_TYPE_DEBUG, " found! %s\n", GMCH_2s (ch)); GNUNET_CONTAINER_DLL_remove (t->channel_head, t->channel_tail, aux); GNUNET_free (aux); return; } + } } -- cgit v1.2.3