- better debug, minor code cleanup
authorBart Polot <bart@net.in.tum.de>
Wed, 14 Nov 2012 14:21:18 +0000 (14:21 +0000)
committerBart Polot <bart@net.in.tum.de>
Wed, 14 Nov 2012 14:21:18 +0000 (14:21 +0000)
src/mesh/gnunet-service-mesh.c
src/mesh/mesh_block_lib.c
src/mesh/test_mesh_2dtorus.conf

index a17aaa64904645897fdbd9f1c1ffac43c04be48d..5bc13880e33c10b6195690e2e0bec7b0da21c217 100644 (file)
@@ -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,
                                             &regex_edge_iterator, ctx);
-  GNUNET_break (GNUNET_OK == result || SIZE_MAX == size);
+  GNUNET_break (GNUNET_OK == result);
 
   /* Did anything match? */
   if (0 == ctx->longest_match)
index 889fb19e09d84b90cc145b9aff3ff7c703135883..61d4607e56257c78a1761fbe2abb6397d2d9c73c 100644 (file)
@@ -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");
index 10589e537208938973ad8dd78c2d94e902f9e922..0d441416fea326fe7c689e93bde60e5734d11346 100644 (file)
@@ -15,6 +15,7 @@ ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 HOSTNAME = localhost
 PORT = 10001
+DISABLE_TRY_CONNECT = YES
 
 [nse]
 WORKBITS = 0