- client can be owner AND destination
authorBart Polot <bart@net.in.tum.de>
Wed, 10 Jul 2013 12:12:11 +0000 (12:12 +0000)
committerBart Polot <bart@net.in.tum.de>
Wed, 10 Jul 2013 12:12:11 +0000 (12:12 +0000)
src/mesh/gnunet-service-mesh.c

index 2122c28a5bc7301037bbd0549017d381d1056b29..aba4f3dfb0f235a834cb66a514a7c068ca605294 100644 (file)
@@ -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;