nicer logging, activating testcase
authorChristian Grothoff <christian@grothoff.org>
Thu, 18 Feb 2010 13:12:46 +0000 (13:12 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 18 Feb 2010 13:12:46 +0000 (13:12 +0000)
src/hostlist/Makefile.am
src/hostlist/hostlist-client.c
src/hostlist/hostlist-server.c
src/hostlist/test_gnunet_daemon_hostlist.c
src/hostlist/test_gnunet_daemon_hostlist_peer1.conf
src/hostlist/test_gnunet_daemon_hostlist_peer2.conf

index 6aca797d35a56107f9e833d5bb024428863a76b1..c70dbf5c3b13f253ca14a5286d8e1abaaa54411f 100644 (file)
@@ -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
index e816b46c416dc6b85442c03dd074b4b320c78724..972e2d27d778f400725894f3669bd6bcc4baa05e 100644 (file)
@@ -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,
index 817a11bfc5d301ffb3fd46a72cc9638b3c562bf4..3615769ba3e261095bbb670c2df9d086167fc273 100644 (file)
@@ -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);
 }
 
index eca93a624ff2df9a96a4763309914f6d4cadce73..9e808fc58790194d930043969a76a3c37a717f5d 100644 (file)
@@ -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);
 }
 
 
index 2ee203504819345cd861b6c8ffd16be4f0c7845b..8f3e8c91fbfd1a36a0d3b924109007b92fa42155 100644 (file)
@@ -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
index 9e339b918bb53f7ab3cf2ac8f78e9c340ca57663..9f66cf4d0c0dfa1d74dfa44ff1423251d721cbe1 100644 (file)
@@ -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