fix
authorChristian Grothoff <christian@grothoff.org>
Thu, 7 Jul 2011 14:57:22 +0000 (14:57 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 7 Jul 2011 14:57:22 +0000 (14:57 +0000)
src/util/gnunet-resolver.c
src/util/resolver_api.c

index 85aedcacf247a1bbbe16998315a78b49b1052705..01def2c9ebf27d067e0e7c650e3fa5176c652cc0 100644 (file)
@@ -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,
index 4261f495c2a72e7aff2ca3a2225829ffd730d94a..0bf0008ba0460a69c418f4247dcda019a0e2c8aa 100644 (file)
@@ -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);
 }