From: Bart Polot Date: Fri, 2 Sep 2011 20:03:13 +0000 (+0000) Subject: Fixed bad merge X-Git-Tag: initial-import-from-subversion-38251~17229 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dc35fb3ef01e26eb7a69fdfcafd4632fb1493908;p=oweals%2Fgnunet.git Fixed bad merge --- diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c index fa2bd6682..fcc515042 100644 --- a/src/mesh/mesh_api_new.c +++ b/src/mesh/mesh_api_new.c @@ -406,24 +406,8 @@ destroy_tunnel (struct GNUNET_MESH_Handle *h, MESH_TunnelNumber tid) GNUNET_free (t->peers); GNUNET_free (t); return; - } - GNUNET_CONTAINER_DLL_remove (h->tunnels_head, h->tunnels_tail, t); - for (i = 0; i < t->npeers; i++) - { - GNUNET_PEER_resolve (t->peers[i]->id, &pi); - t->disconnect_handler (t->cls, &pi); - GNUNET_PEER_change_rc (t->peers[i]->id, -1); - GNUNET_free (t->peers[i]); - } - h->cleaner (h->cls, t, NULL); /* FIXME ctx? */ - if (0 != t->owner) - GNUNET_PEER_change_rc (t->owner, -1); - GNUNET_free (t->peers); - GNUNET_free (t); - return; } - /** * Get the peer descriptor for the peer with id from the given tunnel * @param t Tunnel handle @@ -1173,8 +1157,8 @@ GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun) msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY); msg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage)); - msg.tunnel_id = htonl (t->tid); - destroy_tunnel (h, t->tid); + msg.tunnel_id = htonl (tun->tid); + destroy_tunnel (h, tun->tid); send_packet (h, &msg.header); }