aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-02-18 13:12:46 +0000
committerChristian Grothoff <christian@grothoff.org>2010-02-18 13:12:46 +0000
commit0d0886cc467bf46358245ea0d8a66638daa969a0 (patch)
treec8ae0e7e44860885fe53eed6dcd49ad3d8591cba /src
parent79a336d80905380fdf92bdf6ba4bc160e286c98a (diff)
downloadgnunet-0d0886cc467bf46358245ea0d8a66638daa969a0.tar.gz
gnunet-0d0886cc467bf46358245ea0d8a66638daa969a0.zip
nicer logging, activating testcase
Diffstat (limited to 'src')
-rw-r--r--src/hostlist/Makefile.am2
-rw-r--r--src/hostlist/hostlist-client.c4
-rw-r--r--src/hostlist/hostlist-server.c4
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist.c7
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_peer1.conf12
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_peer2.conf12
6 files changed, 21 insertions, 20 deletions
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 = \
30check_PROGRAMS = \ 30check_PROGRAMS = \
31 test_gnunet_daemon_hostlist 31 test_gnunet_daemon_hostlist
32 32
33# TESTS = $(check_PROGRAMS) 33TESTS = $(check_PROGRAMS)
34 34
35test_gnunet_daemon_hostlist_SOURCES = \ 35test_gnunet_daemon_hostlist_SOURCES = \
36 test_gnunet_daemon_hostlist.c 36 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 ()
624 hostlist_delay.value, 624 hostlist_delay.value,
625 GNUNET_YES); 625 GNUNET_YES);
626 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 626 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
627 _("Will consider downloading hostlist in %llums\n"), 627 _("Have %u/%u connections. Will consider downloading hostlist in %llums\n"),
628 connection_count,
629 MIN_CONNECTIONS,
628 (unsigned long long) delay.value); 630 (unsigned long long) delay.value);
629 current_task = GNUNET_SCHEDULER_add_delayed (sched, 631 current_task = GNUNET_SCHEDULER_add_delayed (sched,
630 delay, 632 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,
238 method); 238 method);
239 return MHD_NO; 239 return MHD_NO;
240 } 240 }
241 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
242 _("Received request for our hostlist\n"));
243 if (NULL == *con_cls) 241 if (NULL == *con_cls)
244 { 242 {
245 (*con_cls) = &dummy; 243 (*con_cls) = &dummy;
@@ -263,6 +261,8 @@ access_handler_callback (void *cls,
263 _("Could not handle hostlist request since I do not have a response yet\n")); 261 _("Could not handle hostlist request since I do not have a response yet\n"));
264 return MHD_NO; /* internal error, no response yet */ 262 return MHD_NO; /* internal error, no response yet */
265 } 263 }
264 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
265 _("Received request for our hostlist\n"));
266 return MHD_queue_response (connection, MHD_HTTP_OK, response); 266 return MHD_queue_response (connection, MHD_HTTP_OK, response);
267} 267}
268 268
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 @@
27#include "gnunet_arm_service.h" 27#include "gnunet_arm_service.h"
28#include "gnunet_transport_service.h" 28#include "gnunet_transport_service.h"
29 29
30#define VERBOSE GNUNET_YES 30#define VERBOSE GNUNET_NO
31 31
32#define START_ARM GNUNET_YES 32#define START_ARM GNUNET_YES
33 33
@@ -114,9 +114,8 @@ notify_connect (void *cls,
114 timeout_task); 114 timeout_task);
115 timeout_task = GNUNET_SCHEDULER_NO_TASK; 115 timeout_task = GNUNET_SCHEDULER_NO_TASK;
116 } 116 }
117 GNUNET_SCHEDULER_add_delayed (sched, 117 GNUNET_SCHEDULER_add_now (sched,
118 GNUNET_TIME_UNIT_MINUTES, 118 &clean_up, NULL);
119 &clean_up, NULL);
120} 119}
121 120
122 121
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
8[transport] 8[transport]
9PORT = 12965 9PORT = 12965
10PLUGINS = tcp 10PLUGINS = tcp
11DEBUG = YES 11#DEBUG = YES
12 12
13[arm] 13[arm]
14PORT = 12966 14PORT = 12966
@@ -26,8 +26,8 @@ PORT = 12969
26 26
27[core] 27[core]
28PORT = 12970 28PORT = 12970
29DEBUG = YES 29#DEBUG = YES
30PREFIX = valgrind --tool=memcheck 30#PREFIX = valgrind --tool=memcheck
31 31
32[testing] 32[testing]
33WEAKRANDOM = YES 33WEAKRANDOM = YES
@@ -36,9 +36,9 @@ WEAKRANDOM = YES
36HTTPPORT = 12980 36HTTPPORT = 12980
37SERVERS = http://localhost:12981/ 37SERVERS = http://localhost:12981/
38OPTIONS = -b -p 38OPTIONS = -b -p
39DEBUG = YES 39#DEBUG = YES
40#BINARY = /home/grothoff/bin/gnunet-daemon-hostlist 40#BINARY = /home/grothoff/bin/gnunet-daemon-hostlist
41 41
42[topology] 42[topology]
43DEBUG = YES 43#DEBUG = YES
44PREFIX = valgrind --tool=memcheck 44#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
8[transport] 8[transport]
9PORT = 22965 9PORT = 22965
10PLUGINS = tcp 10PLUGINS = tcp
11DEBUG = YES 11#DEBUG = YES
12 12
13[arm] 13[arm]
14PORT = 22966 14PORT = 22966
@@ -26,8 +26,8 @@ PORT = 22969
26 26
27[core] 27[core]
28PORT = 22970 28PORT = 22970
29DEBUG = YES 29#DEBUG = YES
30PREFIX = valgrind --tool=memcheck 30#PREFIX = valgrind --tool=memcheck
31 31
32[testing] 32[testing]
33WEAKRANDOM = YES 33WEAKRANDOM = YES
@@ -36,9 +36,9 @@ WEAKRANDOM = YES
36HTTPPORT = 12981 36HTTPPORT = 12981
37SERVERS = http://localhost:12980/ 37SERVERS = http://localhost:12980/
38OPTIONS = -b -p 38OPTIONS = -b -p
39DEBUG = YES 39#DEBUG = YES
40#BINARY = /home/grothoff/bin/gnunet-daemon-hostlist 40#BINARY = /home/grothoff/bin/gnunet-daemon-hostlist
41 41
42[topology] 42[topology]
43DEBUG = YES 43#DEBUG = YES
44PREFIX = valgrind --tool=memcheck 44#PREFIX = valgrind --tool=memcheck