From 46e8465d4181379006b84122afc2276dcc20abb7 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Wed, 10 Jul 2013 12:12:11 +0000 Subject: [PATCH] - client can be owner AND destination --- src/mesh/gnunet-service-mesh.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 2122c28a5..aba4f3dfb 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -964,17 +964,13 @@ client_delete_tunnel (struct MeshClient *c, struct MeshTunnel *t) t->local_tid, t)); } - else if (c == t->client) + if (c == t->client) { GNUNET_assert (GNUNET_YES == GNUNET_CONTAINER_multihashmap32_remove (c->incoming_tunnels, t->local_tid_dest, t)); } - else - { - GNUNET_break (0); - } } /** @@ -2688,7 +2684,7 @@ tunnel_destroy_iterator (void *cls, t->next_hop = 0; } } - else if (c == t->owner) + if (c == t->owner) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Client %u is owner.\n", c->id); t->owner = NULL; @@ -2697,10 +2693,7 @@ tunnel_destroy_iterator (void *cls, t->prev_hop = 0; } } - else - { - GNUNET_break (0); - } + tunnel_destroy_empty (t); return GNUNET_OK; @@ -4499,7 +4492,7 @@ handle_local_tunnel_destroy (void *cls, struct GNUNET_SERVER_Client *client, { t->client = NULL; } - else if (c == t->owner) + if (c == t->owner) { peer_info_remove_tunnel (peer_get_short (t->dest), t); t->owner = NULL; -- 2.25.1