From: Bart Polot Date: Wed, 4 Jul 2012 14:03:03 +0000 (+0000) Subject: - more debug messages, tweaked parameters for testing X-Git-Tag: initial-import-from-subversion-38251~12655 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=46b8a4d6a46976cac5b83dcff63240c03583943e;p=oweals%2Fgnunet.git - more debug messages, tweaked parameters for testing --- diff --git a/src/mesh/gnunet-service-mesh_new.c b/src/mesh/gnunet-service-mesh_new.c index ca37ea542..52485dcdd 100644 --- a/src/mesh/gnunet-service-mesh_new.c +++ b/src/mesh/gnunet-service-mesh_new.c @@ -60,11 +60,11 @@ 300) #define APP_ANNOUNCE_TIME GNUNET_TIME_relative_multiply(\ GNUNET_TIME_UNIT_SECONDS,\ - 5) + 15) #define ID_ANNOUNCE_TIME GNUNET_TIME_relative_multiply(\ GNUNET_TIME_UNIT_SECONDS,\ - 5) + 15) #define UNACKNOWLEDGED_WAIT GNUNET_TIME_relative_multiply(\ GNUNET_TIME_UNIT_SECONDS,\ @@ -4228,9 +4228,7 @@ dht_get_string_handler (void *cls, struct GNUNET_TIME_Absolute exp, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "DHT GET STRING RETURNED RESULTS\n"); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - " key: %s\n"); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "DHT GET STRING RETURNED RESULTS\n"); + " key: %s\n", GNUNET_h2s (key)); proof = (char *) &block[1]; if (GNUNET_OK != GNUNET_REGEX_check_proof (proof, key)) { @@ -5019,8 +5017,10 @@ handle_local_connect_by_string (void *cls, struct GNUNET_SERVER_Client *client, const char *string; size_t size; size_t len; - - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connect by string started\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "************************************************************\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Connect by string started\n"); msg = (struct GNUNET_MESH_ConnectPeerByString *) message; size = htons (message->size); @@ -5073,6 +5073,13 @@ handle_local_connect_by_string (void *cls, struct GNUNET_SERVER_Client *client, /* Initialize context */ size = GNUNET_REGEX_get_first_key(string, len, &key); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "************************************************************\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + " consumed %u bits out of %u\n", size, len); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + " looking for %s\n", GNUNET_h2s (&key)); + ctx = GNUNET_malloc (sizeof (struct MeshRegexSearchContext)); ctx->position = size; ctx->t = t; diff --git a/src/mesh/test_mesh_regex.c b/src/mesh/test_mesh_regex.c index 89539042c..9c545b499 100644 --- a/src/mesh/test_mesh_regex.c +++ b/src/mesh/test_mesh_regex.c @@ -373,8 +373,12 @@ peergroup_ready (void *cls, const char *emsg) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "************************************************************\n"); GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Create tunnel & connect by string\n"); + "Create tunnel\n"); t = GNUNET_MESH_tunnel_create (h1, NULL, &ch, &dh, NULL); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "************************************************************\n"); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Connect by string\n"); GNUNET_MESH_peer_request_connect_by_string (t, "abc"); /* connect handler = success, timeout = error */