Small fix, improved comment
authorBart Polot <bart@net.in.tum.de>
Mon, 7 Nov 2011 12:34:30 +0000 (12:34 +0000)
committerBart Polot <bart@net.in.tum.de>
Mon, 7 Nov 2011 12:34:30 +0000 (12:34 +0000)
src/mesh/gnunet-service-mesh.c

index f1bef6b4df8e725c49236d33763282a00981b83d..e3a8b3f0e2f968af64671fcf6a816fc1d64c9dc2 100644 (file)
@@ -1449,6 +1449,7 @@ peer_info_remove_path (struct MeshPeerInfo *peer, GNUNET_PEER_Id p1,
   for (i = 0; i < peer->ntunnels; i++)
   {
     d = tunnel_notify_connection_broken (peer->tunnels[i], p1, p2);
+    if (0 == d) continue;
     /* TODO
      * Problem: one or more peers have been deleted from the tunnel tree.
      * We don't know who they are to try to add them again.
@@ -1473,7 +1474,9 @@ peer_info_remove_path (struct MeshPeerInfo *peer, GNUNET_PEER_Id p1,
     }
     if (NULL != aux)
     {
-      /* No callback, as peer will be already disconnected */
+      /* No callback, as peer will be already disconnected and a connection
+       * scheduled by tunnel_notify_connection_broken.
+       */
       tree_add_path (peer->tunnels[i]->tree, aux, NULL, NULL);
     }
     else