- begin work on enhanced multipart receiving
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh_connection.c
index a76b7e9a61d5cd8cc964e1715aa621c83fc0d18d..04f1e07c4c0849254d1f725ceb80f09be36733b1 100644 (file)
@@ -639,7 +639,6 @@ get_prev_hop (const struct MeshConnection *c)
 {
   GNUNET_PEER_Id id;
 
-  LOG (GNUNET_ERROR_TYPE_DEBUG, "Get prev hop, own pos %u\n", c->own_pos);
   if (0 == c->own_pos || c->path->length < 2)
     id = c->path->peers[0];
   else
@@ -1154,9 +1153,9 @@ register_neighbors (struct MeshConnection *c)
     GNUNET_STATISTICS_update (stats, "# bad paths", 1, GNUNET_NO);
 
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  register neighbors failed\n");
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "  prev: %s, %d\n",
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "  prev: %s, neighbor: %d\n",
          GMP_2s (prev_peer), GMP_is_neighbor (prev_peer));
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "  next: %s, %d\n",
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "  next: %s, neighbor: %d\n",
          GMP_2s (next_peer), GMP_is_neighbor (next_peer));
     return GNUNET_SYSERR;
   }
@@ -1180,11 +1179,17 @@ 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);
+    LOG (GNUNET_ERROR_TYPE_ERROR, "  cstate: %u\n", c->state);
+  }
 
   peer = get_prev_hop (c);
   if (GNUNET_OK != GMP_remove_connection (peer, c))
+  {
     GNUNET_break (MESH_CONNECTION_NEW == c->state);
+    LOG (GNUNET_ERROR_TYPE_ERROR, "  cstate: %u\n", c->state);
+  }
 }
 
 
@@ -1742,7 +1747,7 @@ handle_mesh_kx (const struct GNUNET_PeerIdentity *peer,
   type = ntohs (msg->header.type);
   LOG (GNUNET_ERROR_TYPE_DEBUG, "\n\n");
   LOG (GNUNET_ERROR_TYPE_DEBUG, "got a %s message from %s\n",
-              GM_m2s (type), GNUNET_i2s (peer));
+       GM_m2s (type), GNUNET_i2s (peer));
 
   /* Check connection */
   c = connection_get (&msg->cid);
@@ -1752,6 +1757,7 @@ handle_mesh_kx (const struct GNUNET_PeerIdentity *peer,
     LOG (GNUNET_ERROR_TYPE_DEBUG, "WARNING connection unknown\n");
     return GNUNET_OK;
   }
+  LOG (GNUNET_ERROR_TYPE_DEBUG, " on connection %s\n", GMC_2s (c));
 
   /* Check if origin is as expected */
   neighbor = get_prev_hop (c);