Fixed a bug in create path handling, extended debug info.
authorBart Polot <bart@net.in.tum.de>
Mon, 3 Oct 2011 16:35:16 +0000 (16:35 +0000)
committerBart Polot <bart@net.in.tum.de>
Mon, 3 Oct 2011 16:35:16 +0000 (16:35 +0000)
src/mesh/gnunet-service-mesh.c
src/mesh/mesh_api_new.c
src/mesh/test_mesh_small.conf

index 9f302dcdaac9907c04cbfc2222192919ea7eb3e2..c1a35b37fa45cc9826d6e7857b68b30cd4b9b632 100644 (file)
@@ -1221,7 +1221,10 @@ send_core_create_path (void *cls, size_t size, void *buf)
 
   if (size < size_needed || NULL == buf)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: Retransmitting create path\n");
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: create path retransmit!\n");
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH:   buf:  %p\n", buf);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH:   size: (%u/%u)\n",
+                size, size_needed);
     GNUNET_CORE_notify_transmit_ready (core_handle, 0, 0,
                                        GNUNET_TIME_UNIT_FOREVER_REL,
                                        path_get_first_hop (t->tree, peer->id),
@@ -1639,11 +1642,11 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
     path_add_to_origin (orig_peer_info, path);  /* inverts path!  */
     info = GNUNET_malloc (sizeof (struct MeshDataDescriptor));
     info->origin = &t->id;
-    info->peer = GNUNET_CONTAINER_multihashmap_get (peers, &id.hashPubKey);
+    info->peer = GNUNET_CONTAINER_multihashmap_get (peers, &peer->hashPubKey);
     GNUNET_assert (NULL != info->peer);
     for (j = 0; info->peer->core_transmit[j]; j++)
     {
-      if (j == 9)
+      if (j == (CORE_QUEUE_SIZE - 1))
       {
         GNUNET_break (0);
         return GNUNET_OK;
index 658696df63a28ade119e31c85a01754dabc81bc8..8ddeecff06d78d2cd2568f937e76838c1a45fb30 100644 (file)
@@ -105,7 +105,7 @@ struct GNUNET_MESH_TransmitHandle
   uint32_t priority;
 
     /**
-     * Target of the message, 0 for broadcast.  This field
+     * Target of the message, 0 for multicast.  This field
      * is only valid if 'notify' is non-NULL.
      */
   GNUNET_PEER_Id target;
index 84e281bd13ebf4d85456ba8b5be48cec88660321..0c7485c20959d306b61d578bc0fb52f38cb026e3 100644 (file)
@@ -76,6 +76,6 @@ MAX_OUTSTANDING_CONNECTIONS = 75
 DELETE_FILES = YES
 
 [test_mesh_small]
-WAIT_TIME = 60
+WAIT_TIME = 70
 CONNECTION_LIMIT = 10
 DATA_OUTPUT_FILE=data_output