From 8d41ce66589d90b1120ef6a72a7b9869ca6ca29f Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 3 Oct 2011 16:35:16 +0000 Subject: [PATCH] Fixed a bug in create path handling, extended debug info. --- src/mesh/gnunet-service-mesh.c | 9 ++++++--- src/mesh/mesh_api_new.c | 2 +- src/mesh/test_mesh_small.conf | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 9f302dcda..c1a35b37f 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -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; diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c index 658696df6..8ddeecff0 100644 --- a/src/mesh/mesh_api_new.c +++ b/src/mesh/mesh_api_new.c @@ -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; diff --git a/src/mesh/test_mesh_small.conf b/src/mesh/test_mesh_small.conf index 84e281bd1..0c7485c20 100644 --- a/src/mesh/test_mesh_small.conf +++ b/src/mesh/test_mesh_small.conf @@ -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 -- 2.25.1