summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-02-28 17:06:27 +0000
committerBart Polot <bart@net.in.tum.de>2012-02-28 17:06:27 +0000
commit9cb4c9b8311ec7ab68ed120dc7db9041359abf33 (patch)
tree86c8bb03e93af4e54b9bdd4b53006814f0f2579b
parent0fbf1baf6c16766f9eb481d8e89cd1d4e04de1f2 (diff)
- Give more time for GET to suceed, minor cleanups
-rw-r--r--src/dht/test_dht_twopeer.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/dht/test_dht_twopeer.c b/src/dht/test_dht_twopeer.c
index 3a7957a3c..a3b6e4a54 100644
--- a/src/dht/test_dht_twopeer.c
+++ b/src/dht/test_dht_twopeer.c
@@ -227,11 +227,7 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct PeerGetContext *get_context = cls;
- if (get_context->get_attempts < MAX_GET_ATTEMPTS)
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Get attempt %u failed, retrying request!\n",
- get_context->get_attempts);
- else
+ if (get_context->get_attempts >= MAX_GET_ATTEMPTS)
{
FPRINTF (stderr, "%s", "?\n");
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -243,11 +239,14 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
"GET attempt failed, ending test!\n");
return;
}
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Get attempt %u failed, retrying request!\n",
+ get_context->get_attempts);
FPRINTF (stderr, "%s", ".");
get_context->get_attempts++;
get_context->retry_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
- (GNUNET_TIME_UNIT_SECONDS, 10),
+ (GNUNET_TIME_UNIT_SECONDS, 60),
&stop_retry_get, get_context);
get_context->get_handle =
GNUNET_DHT_get_start (get_context->dht_handle,
@@ -311,17 +310,15 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"connected peer %s to peer %s, distance %u\n",
first_daemon->shortname, second_daemon->shortname, distance);
-#endif
}
-#if VERBOSE
else
{
failed_connections++;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Failed to connect peer %s to peer %s with error :\n%s\n",
first_daemon->shortname, second_daemon->shortname, emsg);
- }
#endif
+ }
if (total_connections == expected_connections)
{