From 27a1f7a5af21adb6b09d0d642df632e3341f9e35 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 15 Mar 2010 12:29:02 +0000 Subject: [PATCH] increase some timeouts, decrease others --- src/core/gnunet-service-core.c | 7 +++++++ src/hostlist/test_gnunet_daemon_hostlist.c | 3 +-- src/statistics/gnunet-statistics.c | 8 ++++++-- src/testing/testing.c | 4 ++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index eabb2d946..5acecc5f9 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -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); diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c index 9e808fc58..a8f092121 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist.c +++ b/src/hostlist/test_gnunet_daemon_hostlist.c @@ -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, diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index 976a82174..ed0432194 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c @@ -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); diff --git a/src/testing/testing.c b/src/testing/testing.c index 78ef9bb1f..11647ecd6 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c @@ -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)) -- 2.25.1