From 743161ad14a85e7a9a000cca842477e6bc1f6eeb Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 21 Aug 2012 16:12:29 +0000 Subject: [PATCH] - more info on error --- src/mesh/gnunet-service-mesh.c | 21 ++++++++++++++++++++- src/mesh/test_mesh_local_traffic.c | 4 ++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 2189d611d..61c7dec52 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -6893,6 +6893,12 @@ handle_local_to_origin (void *cls, struct GNUNET_SERVER_Client *client, t = tunnel_get_by_local_id (c, tid); if (NULL == t) { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Tunnel %X unknown.\n", tid); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, " for client %u.\n", c->id); + if (t->owner == c) + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, " (client is owner)\n"); + else + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, " (client is leaf)\n"); GNUNET_break (0); GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); return; @@ -6999,6 +7005,12 @@ handle_local_multicast (void *cls, struct GNUNET_SERVER_Client *client, if (NULL == t) { GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Tunnel %X unknown.\n", tid); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, " for client %u.\n", c->id); + if (t->owner == c) + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, " (client is owner)\n"); + else + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, " (client is leaf)\n"); GNUNET_break (0); GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); return; } @@ -7078,6 +7090,12 @@ handle_local_ack (void *cls, struct GNUNET_SERVER_Client *client, if (NULL == t) { GNUNET_break (0); // FIXME fc + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Tunnel %X unknown.\n", tid); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, " for client %u.\n", c->id); + if (t->owner == c) + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, " (client is owner)\n"); + else + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, " (client is leaf)\n"); GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); return; } @@ -7099,7 +7117,8 @@ handle_local_ack (void *cls, struct GNUNET_SERVER_Client *client, tunnel_send_fwd_ack (t, GNUNET_MESSAGE_TYPE_MESH_LOCAL_ACK); } - GNUNET_SERVER_receive_done (client, GNUNET_OK); + GNUNET_SERVER_receive_done (client, GNUNET_OK); + return; } diff --git a/src/mesh/test_mesh_local_traffic.c b/src/mesh/test_mesh_local_traffic.c index c3e99f84a..749c9cd46 100644 --- a/src/mesh/test_mesh_local_traffic.c +++ b/src/mesh/test_mesh_local_traffic.c @@ -32,7 +32,7 @@ #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) -#define TARGET 1000 +#define TARGET 100000 /** * DIFFERENT TESTS TO RUN @@ -512,7 +512,7 @@ main (int argc, char *argv[]) FPRINTF (stderr, "\nTest time %llu ms\n", (unsigned long long) total_time.rel_value); FPRINTF (stderr, "Test payload bandwidth: %f kb/s\n", - 4 * 1000.0 / total_time.rel_value); // 4bytes * ms + total_traffic * 4.0 / total_time.rel_value); // 4bytes * kb/ms FPRINTF (stderr, "Test throughput: %f packets/s\n\n", total_traffic * 1000.0 / total_time.rel_value); // 1000 packets * ms GAUGER ("MESH", -- 2.25.1