increase some timeouts, decrease others
authorChristian Grothoff <christian@grothoff.org>
Mon, 15 Mar 2010 12:29:02 +0000 (12:29 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 15 Mar 2010 12:29:02 +0000 (12:29 +0000)
src/core/gnunet-service-core.c
src/hostlist/test_gnunet_daemon_hostlist.c
src/statistics/gnunet-statistics.c
src/testing/testing.c

index eabb2d9469ac7f38cc0d847340f697331b1a6b6c..5acecc5f9380556ae22cc7fd572a29faf4d06746 100644 (file)
@@ -3295,6 +3295,13 @@ handle_transport_receive (void *cls,
           (n->status != PEER_STATE_KEY_CONFIRMED))
         {
           GNUNET_break_op (0);
+         /* blacklist briefly (?); might help recover (?) */
+         GNUNET_TRANSPORT_blacklist (sched, cfg,
+                                     &n->peer, 
+                                     GNUNET_TIME_UNIT_SECONDS,
+                                     GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
+                                                                    5),
+                                     NULL, NULL);
           return;
         }
       handle_encrypted_message (n, (const struct EncryptedMessage *) message);
index 9e808fc58790194d930043969a76a3c37a717f5d..a8f092121626e8697e733a87beda3f86309e95c3 100644 (file)
@@ -225,8 +225,7 @@ run (void *cls,
   ok++;
   sched = s;
   timeout_task = GNUNET_SCHEDULER_add_delayed (sched,
-                                              GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
-                                                                             15),
+                                              TIMEOUT,
                                               &timeout_error,
                                               NULL);
   GNUNET_SCHEDULER_add_delayed (sched,
index 976a8217472acb6f89e000e370ea18575cb02b72..ed0432194c545043f35d3157fe8710f5d7b43f29 100644 (file)
@@ -30,7 +30,7 @@
 #include "gnunet_statistics_service.h"
 #include "statistics.h"
 
-#define GET_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15)
+#define GET_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1)
 
 /**
  * Final status code.
@@ -89,7 +89,11 @@ cleanup (void *cls, int success)
   struct GNUNET_STATISTICS_Handle *h = cls;
 
   if (success != GNUNET_OK)
-    ret = 1;
+    {
+      fprintf (stderr,
+              _("Failed to obtain statistics.\n"));
+      ret = 1;
+    }
   if (h != NULL)
     GNUNET_STATISTICS_destroy (h,
                               GNUNET_NO);
index 78ef9bb1f7695cc859df709922b586c5f0ceae90..11647ecd61db273cbcc810f0def9b51ef8bba715 100644 (file)
@@ -504,6 +504,10 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
 #endif
   cc = GNUNET_CLIENT_connect (d->sched, "arm", d->cfg);
   GNUNET_CLIENT_service_shutdown (cc);
+  /* FIXME: replace shutdown sequence via client with
+     shutdown via signal and waitpid; then we don't need
+     to sleep here any longer... */
+  sleep (1);
 
   /* state clean up and notifications */
   if (0 != UNLINK (d->cfgfile))