From bd2718cfe039ee71b00509cc8d19f9d83294b069 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 7 Jul 2011 14:57:22 +0000 Subject: [PATCH] fix --- src/util/gnunet-resolver.c | 8 ++++++++ src/util/resolver_api.c | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/util/gnunet-resolver.c b/src/util/gnunet-resolver.c index 85aedcacf..01def2c9e 100644 --- a/src/util/gnunet-resolver.c +++ b/src/util/gnunet-resolver.c @@ -81,6 +81,14 @@ main (int argc, char *const *argv) static const struct GNUNET_GETOPT_CommandLineOption options[] = { GNUNET_GETOPT_OPTION_END }; + GNUNET_PROGRAM_run (argc, + argv, + "gnunet-resolver [hostname]", + gettext_noop + ("Test GNUnet DNS resolver code."), + options, &run, NULL); + fprintf (stderr, "again...\n"); + return (GNUNET_OK == GNUNET_PROGRAM_run (argc, argv, diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index 4261f495c..0bf0008ba 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2009 Christian Grothoff (and other contributing authors) + (C) 2009, 2011 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -224,6 +224,7 @@ void GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *c) { check_config (c); + backoff = GNUNET_TIME_UNIT_MILLISECONDS; cfg = c; } @@ -255,6 +256,7 @@ GNUNET_RESOLVER_disconnect () GNUNET_SCHEDULER_cancel (s_task); s_task = GNUNET_SCHEDULER_NO_TASK; } + cfg = NULL; } @@ -707,8 +709,7 @@ reconnect () r_task = GNUNET_SCHEDULER_add_delayed (backoff, &reconnect_task, NULL); - backoff = GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_SECONDS, - GNUNET_TIME_relative_multiply (backoff, 2)); + backoff = GNUNET_TIME_relative_multiply (backoff, 2); } -- 2.25.1