- fix handling of duplicate incoming channel create with respect to queued retransmis...
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh_peer.c
index 2884b1a53618058500786d46bebc00a7eabf6acc..241e6481ea02ea450d7ef709bc2f7a111bca53b1 100644 (file)
@@ -870,7 +870,7 @@ queue_send (void *cls, size_t size, void *buf)
   queue = peer_get_first_message (peer);
   if (NULL == queue)
   {
-    GNUNET_break (0); /* Core tmt_rdy should've been canceled */
+    GNUNET_assert (0); /* Core tmt_rdy should've been canceled */
     return 0;
   }
   c = queue->c;
@@ -1808,7 +1808,7 @@ GMP_remove_path (struct MeshPeer *peer, struct MeshPeerPath *path)
                      sizeof (GNUNET_PEER_Id) * path->length))
     {
       GNUNET_CONTAINER_DLL_remove (peer->path_head, peer->path_tail, iter);
-      if (path != iter)
+      if (iter != path)
         path_destroy (iter);
     }
   }
@@ -2067,11 +2067,10 @@ GMP_notify_broken_link (struct MeshPeer *peer,
         char *s;
 
         s = path_2s (iter);
-        LOG (GNUNET_ERROR_TYPE_DEBUG, " - destroying %s\n", s);
+        LOG (GNUNET_ERROR_TYPE_DEBUG, " - invalidating %s\n", s);
         GNUNET_free (s);
 
-        GNUNET_CONTAINER_DLL_remove (peer->path_head, peer->path_tail, iter);
-        path_destroy (iter);
+        path_invalidate (iter);
       }
     }
   }