From: Christian Grothoff Date: Thu, 7 Jul 2011 14:57:22 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~17950 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bd2718cfe039ee71b00509cc8d19f9d83294b069;p=oweals%2Fgnunet.git fix --- 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); }