- Fixed bugs in notification of destruction of incoming tunnels
authorBart Polot <bart@net.in.tum.de>
Wed, 22 Feb 2012 17:48:43 +0000 (17:48 +0000)
committerBart Polot <bart@net.in.tum.de>
Wed, 22 Feb 2012 17:48:43 +0000 (17:48 +0000)
src/mesh/gnunet-service-mesh.c

index 0af1ae51dc8f5701f8ab448c87488916ede0c455..80848f2d537a3a6a8815f73f7251c7673562f023 100644 (file)
@@ -1085,7 +1085,7 @@ send_clients_tunnel_destroy (struct MeshTunnel *t)
 
   msg.header.size = htons (sizeof (msg));
   msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY);
-  msg.tunnel_id = htonl (t->local_tid);
+  msg.tunnel_id = htonl (t->local_tid_dest);
   GNUNET_SERVER_notification_context_broadcast (nc, &msg.header, GNUNET_NO);
 }
 
@@ -3173,9 +3173,11 @@ handle_mesh_tunnel_destroy (void *cls, const struct GNUNET_PeerIdentity *peer,
     GNUNET_break_op (0);
     return GNUNET_OK;
   }
-  if (t->local_tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV)
+  if (t->local_tid_dest >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV)
   {
     /* Tunnel was incoming, notify clients */
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "INCOMING TUNNEL %X %X\n",
+                t->local_tid, t->local_tid_dest);
     send_clients_tunnel_destroy (t);
   }
   tunnel_send_destroy (t);