From: Nathan S. Evans Date: Tue, 12 Oct 2010 13:45:56 +0000 (+0000) Subject: remove debugging stuff, fix for very small values of small world options X-Git-Tag: initial-import-from-subversion-38251~20073 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=00ac4d1d91a2aa5383a7c795704bc6ce8a2e0efb;p=oweals%2Fgnunet.git remove debugging stuff, fix for very small values of small world options --- diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c index 83c96a451..dd8a16419 100644 --- a/src/testing/test_testing_topology.c +++ b/src/testing/test_testing_topology.c @@ -26,7 +26,7 @@ #include "gnunet_core_service.h" #include "gnunet_os_lib.h" -#define VERBOSE GNUNET_YES +#define VERBOSE GNUNET_NO #define DELAY_FOR_LOGGING GNUNET_NO @@ -709,8 +709,10 @@ topology_callback (void *cls, static void topology_creation_finished (void *cls, const char *emsg) { +#if VERBOSE if (emsg == NULL) GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "All topology connections created successfully!\n"); +#endif } static void diff --git a/src/testing/test_testing_topology_blacklist.c b/src/testing/test_testing_topology_blacklist.c index 448531921..8f9a469e5 100644 --- a/src/testing/test_testing_topology_blacklist.c +++ b/src/testing/test_testing_topology_blacklist.c @@ -25,7 +25,7 @@ #include "gnunet_testing_lib.h" #include "gnunet_core_service.h" -#define VERBOSE GNUNET_YES +#define VERBOSE GNUNET_NO /** * How long until we fail the whole testcase? diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index abaeaaf11..23ab2f9fe 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c @@ -1554,6 +1554,8 @@ create_small_world (struct GNUNET_TESTING_PeerGroup *pg, GNUNET_TESTING_Connecti #endif smallWorldConnections = 0; small_world_it = (unsigned int)(natLog * percentage); + if (small_world_it < 1) + small_world_it = 1; GNUNET_assert(small_world_it > 0 && small_world_it < (unsigned int)-1); for (i = 0; i < small_world_it; i++) {