From ba6632a0c4b2f0e452cd541a5fdacdea8c9305e8 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 16 Jul 2012 11:13:52 +0000 Subject: [PATCH] - improve logging, add debug message for GNUNET_break --- src/dht/dht_api.c | 3 +++ src/mesh/test_mesh_regex.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c index 53702fd77..c9f1caee3 100644 --- a/src/dht/dht_api.c +++ b/src/dht/dht_api.c @@ -880,6 +880,9 @@ service_message_handler (void *cls, const struct GNUNET_MessageHeader *msg) break; default: GNUNET_break(0); + LOG (GNUNET_ERROR_TYPE_WARNING, + "Unknown DHT message type: %su\n", + ntohs (msg->type)); break; } if (GNUNET_OK != ret) diff --git a/src/mesh/test_mesh_regex.c b/src/mesh/test_mesh_regex.c index 049b03241..5ecfe1753 100644 --- a/src/mesh/test_mesh_regex.c +++ b/src/mesh/test_mesh_regex.c @@ -225,7 +225,7 @@ tunnel_cleaner (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, { long i = (long) cls; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Incoming tunnel disconnected at peer %d\n", i); return; @@ -449,7 +449,7 @@ peergroup_ready (void *cls, const char *emsg) for (i = 0; i < MESH_REGEX_PEERS; i++) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, +GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Create tunnel\n"); t[i] = GNUNET_MESH_tunnel_create (h1, NULL, &ch, &dh, (void *) (long) i); GNUNET_log (GNUNET_ERROR_TYPE_INFO, @@ -608,7 +608,7 @@ main (int argc, char *argv[]) regex_peers); return 1; } - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: success\n"); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "test: success\n"); return 0; } -- 2.25.1