From 0d0886cc467bf46358245ea0d8a66638daa969a0 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 18 Feb 2010 13:12:46 +0000 Subject: nicer logging, activating testcase --- src/hostlist/Makefile.am | 2 +- src/hostlist/hostlist-client.c | 4 +++- src/hostlist/hostlist-server.c | 4 ++-- src/hostlist/test_gnunet_daemon_hostlist.c | 7 +++---- src/hostlist/test_gnunet_daemon_hostlist_peer1.conf | 12 ++++++------ src/hostlist/test_gnunet_daemon_hostlist_peer2.conf | 12 ++++++------ 6 files changed, 21 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/hostlist/Makefile.am b/src/hostlist/Makefile.am index 6aca797d3..c70dbf5c3 100644 --- a/src/hostlist/Makefile.am +++ b/src/hostlist/Makefile.am @@ -30,7 +30,7 @@ gnunet_daemon_hostlist_CPPFLAGS = \ check_PROGRAMS = \ test_gnunet_daemon_hostlist -# TESTS = $(check_PROGRAMS) +TESTS = $(check_PROGRAMS) test_gnunet_daemon_hostlist_SOURCES = \ test_gnunet_daemon_hostlist.c diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c index e816b46c4..972e2d27d 100644 --- a/src/hostlist/hostlist-client.c +++ b/src/hostlist/hostlist-client.c @@ -624,7 +624,9 @@ schedule_hostlist_task () hostlist_delay.value, GNUNET_YES); GNUNET_log (GNUNET_ERROR_TYPE_INFO, - _("Will consider downloading hostlist in %llums\n"), + _("Have %u/%u connections. Will consider downloading hostlist in %llums\n"), + connection_count, + MIN_CONNECTIONS, (unsigned long long) delay.value); current_task = GNUNET_SCHEDULER_add_delayed (sched, delay, diff --git a/src/hostlist/hostlist-server.c b/src/hostlist/hostlist-server.c index 817a11bfc..3615769ba 100644 --- a/src/hostlist/hostlist-server.c +++ b/src/hostlist/hostlist-server.c @@ -238,8 +238,6 @@ access_handler_callback (void *cls, method); return MHD_NO; } - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - _("Received request for our hostlist\n")); if (NULL == *con_cls) { (*con_cls) = &dummy; @@ -263,6 +261,8 @@ access_handler_callback (void *cls, _("Could not handle hostlist request since I do not have a response yet\n")); return MHD_NO; /* internal error, no response yet */ } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + _("Received request for our hostlist\n")); return MHD_queue_response (connection, MHD_HTTP_OK, response); } diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c index eca93a624..9e808fc58 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist.c +++ b/src/hostlist/test_gnunet_daemon_hostlist.c @@ -27,7 +27,7 @@ #include "gnunet_arm_service.h" #include "gnunet_transport_service.h" -#define VERBOSE GNUNET_YES +#define VERBOSE GNUNET_NO #define START_ARM GNUNET_YES @@ -114,9 +114,8 @@ notify_connect (void *cls, timeout_task); timeout_task = GNUNET_SCHEDULER_NO_TASK; } - GNUNET_SCHEDULER_add_delayed (sched, - GNUNET_TIME_UNIT_MINUTES, - &clean_up, NULL); + GNUNET_SCHEDULER_add_now (sched, + &clean_up, NULL); } diff --git a/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf b/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf index 2ee203504..8f3e8c91f 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf +++ b/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf @@ -8,7 +8,7 @@ PORT = 12964 [transport] PORT = 12965 PLUGINS = tcp -DEBUG = YES +#DEBUG = YES [arm] PORT = 12966 @@ -26,8 +26,8 @@ PORT = 12969 [core] PORT = 12970 -DEBUG = YES -PREFIX = valgrind --tool=memcheck +#DEBUG = YES +#PREFIX = valgrind --tool=memcheck [testing] WEAKRANDOM = YES @@ -36,9 +36,9 @@ WEAKRANDOM = YES HTTPPORT = 12980 SERVERS = http://localhost:12981/ OPTIONS = -b -p -DEBUG = YES +#DEBUG = YES #BINARY = /home/grothoff/bin/gnunet-daemon-hostlist [topology] -DEBUG = YES -PREFIX = valgrind --tool=memcheck +#DEBUG = YES +#PREFIX = valgrind --tool=memcheck diff --git a/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf b/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf index 9e339b918..9f66cf4d0 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf +++ b/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf @@ -8,7 +8,7 @@ PORT = 22964 [transport] PORT = 22965 PLUGINS = tcp -DEBUG = YES +#DEBUG = YES [arm] PORT = 22966 @@ -26,8 +26,8 @@ PORT = 22969 [core] PORT = 22970 -DEBUG = YES -PREFIX = valgrind --tool=memcheck +#DEBUG = YES +#PREFIX = valgrind --tool=memcheck [testing] WEAKRANDOM = YES @@ -36,9 +36,9 @@ WEAKRANDOM = YES HTTPPORT = 12981 SERVERS = http://localhost:12980/ OPTIONS = -b -p -DEBUG = YES +#DEBUG = YES #BINARY = /home/grothoff/bin/gnunet-daemon-hostlist [topology] -DEBUG = YES -PREFIX = valgrind --tool=memcheck +#DEBUG = YES +#PREFIX = valgrind --tool=memcheck -- cgit v1.2.3