- refine break condition
authorBart Polot <bart@net.in.tum.de>
Tue, 17 Dec 2013 00:06:15 +0000 (00:06 +0000)
committerBart Polot <bart@net.in.tum.de>
Tue, 17 Dec 2013 00:06:15 +0000 (00:06 +0000)
src/mesh/gnunet-service-mesh_connection.c
src/mesh/gnunet-service-mesh_peer.c

index 0f81a34604cb37544ec664b4515d200c2d3c66e9..33ae8361c7895a63b18b310d75d6834df4e5a621 100644 (file)
@@ -1186,8 +1186,8 @@ unregister_neighbors (struct MeshConnection *c)
   peer = get_next_hop (c);
   if (GNUNET_OK != GMP_remove_connection (peer, c))
   {
-    GNUNET_break (MESH_CONNECTION_NEW == c->state/*
-                  || MESH_CONNECTION_DESTROYED == c->state*/);
+    GNUNET_break (MESH_CONNECTION_NEW == c->state
+                  || MESH_CONNECTION_DESTROYED == c->state);
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  cstate: %u\n", c->state);
     if (NULL != c->t) GMT_debug (c->t);
   }
@@ -1195,8 +1195,8 @@ unregister_neighbors (struct MeshConnection *c)
   peer = get_prev_hop (c);
   if (GNUNET_OK != GMP_remove_connection (peer, c))
   {
-    GNUNET_break (MESH_CONNECTION_NEW == c->state/*
-                  || MESH_CONNECTION_DESTROYED == c->state*/);
+    GNUNET_break (MESH_CONNECTION_NEW == c->state
+                  || MESH_CONNECTION_DESTROYED == c->state);
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  cstate: %u\n", c->state);
     if (NULL != c->t) GMT_debug (c->t);
   }
index f1ade403126b2308fefd1df3b8bc2435da6c7dda..39006919dd69acf60ebed29de847b19539d0d3b3 100644 (file)
@@ -225,6 +225,8 @@ notify_broken (void *cls,
   struct MeshPeer *peer = cls;
   struct MeshConnection *c = value;
 
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "  notifying %s due to %s\n",
+       GMC_2s (c), GMP_2s (peer));
   GMC_notify_broken (c, peer);
 
   return GNUNET_YES;
@@ -287,7 +289,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
     return;
   }
   if (myid == p->id)
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "     (self)\n");
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "     (self: %s)\n", GMP_2s (p));
   else
     LOG (GNUNET_ERROR_TYPE_DEBUG, "     %s\n", GMP_2s (p));