From: Bart Polot Date: Wed, 14 Nov 2012 14:21:18 +0000 (+0000) Subject: - better debug, minor code cleanup X-Git-Tag: initial-import-from-subversion-38251~10859 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6405272a31a887dcdc90c0732b0931b40baff542;p=oweals%2Fgnunet.git - better debug, minor code cleanup --- diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index a17aaa649..5bc13880e 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -1390,7 +1390,7 @@ regex_edge_iterator (void *cls, current_len = strlen (info->description) - ctx->position; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "* ctlen : %u\n", current_len); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "* tklen : %u\n", len); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "* tk[0] : %c\n", token[0]); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "* token : %.*s\n", len, token); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "* nextk : %s\n", GNUNET_h2s(key)); if (len > current_len) { @@ -1444,7 +1444,7 @@ regex_next_edge (const struct MeshRegexBlock *block, ctx->longest_match = 0; result = GNUNET_MESH_regex_block_iterate (block, size, ®ex_edge_iterator, ctx); - GNUNET_break (GNUNET_OK == result || SIZE_MAX == size); + GNUNET_break (GNUNET_OK == result); /* Did anything match? */ if (0 == ctx->longest_match) diff --git a/src/mesh/mesh_block_lib.c b/src/mesh/mesh_block_lib.c index 889fb19e0..61d4607e5 100644 --- a/src/mesh/mesh_block_lib.c +++ b/src/mesh/mesh_block_lib.c @@ -192,7 +192,7 @@ GNUNET_MESH_regex_block_iterate (const struct MeshRegexBlock *block, // The total size should be exactly the size of (regex + all edges) blocks // If size == -1, block is from cache and therefore previously checked and // assumed correct. - if (offset == size || (size_t) -1 == size) + if (offset == size || SIZE_MAX == size) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "* Block processed, END OK\n"); diff --git a/src/mesh/test_mesh_2dtorus.conf b/src/mesh/test_mesh_2dtorus.conf index 10589e537..0d441416f 100644 --- a/src/mesh/test_mesh_2dtorus.conf +++ b/src/mesh/test_mesh_2dtorus.conf @@ -15,6 +15,7 @@ ACCEPT_FROM6 = ::1; ACCEPT_FROM = 127.0.0.1; HOSTNAME = localhost PORT = 10001 +DISABLE_TRY_CONNECT = YES [nse] WORKBITS = 0