- begin work on enhanced multipart receiving
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh_peer.c
index 1094ea59f0d81489050b8f0256fe13d105cbc93b..aa9f52fe618ae72ecf157101d7b8934da4da82f8 100644 (file)
@@ -1324,8 +1324,10 @@ GMP_connect (struct MeshPeer *peer)
          * path.
          *
          * Re-running the DHT GET should give core time to callback.
+         *
+         * GMT_use_path -> GMC_new -> register_neighbors takes care of
+         * updating statistics about this issue.
          */
-        GNUNET_break (0);
         rerun_search = GNUNET_YES;
       }
       else
@@ -1598,7 +1600,7 @@ GMP_add_path_to_all (const struct MeshPeerPath *p, int confirmed)
  * Remove any path to the peer that has the extact same peers as the one given.
  *
  * @param peer Peer to remove the path from.
- * @param path Path to remove.
+ * @param path Path to remove. Is always destroyed .
  */
 void
 GMP_remove_path (struct MeshPeer *peer, struct MeshPeerPath *path)
@@ -1615,9 +1617,13 @@ GMP_remove_path (struct MeshPeer *peer, struct MeshPeerPath *path)
     if (0 == memcmp (path->peers, iter->peers,
                      sizeof (GNUNET_PEER_Id) * path->length))
     {
+      GNUNET_CONTAINER_DLL_remove (peer->path_head, peer->path_tail, iter);
       path_destroy (iter);
+      if (path == iter)
+        return;
     }
   }
+  path_destroy (path);
 }