aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-07-07 14:57:22 +0000
committerChristian Grothoff <christian@grothoff.org>2011-07-07 14:57:22 +0000
commitbd2718cfe039ee71b00509cc8d19f9d83294b069 (patch)
tree511c2051293eea9db931d61a04cb17ee2b6b6289 /src/util
parent83f220addf1e5b5d6cca58307cd4b16abd87b24e (diff)
downloadgnunet-bd2718cfe039ee71b00509cc8d19f9d83294b069.tar.gz
gnunet-bd2718cfe039ee71b00509cc8d19f9d83294b069.zip
fix
Diffstat (limited to 'src/util')
-rw-r--r--src/util/gnunet-resolver.c8
-rw-r--r--src/util/resolver_api.c7
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)
81 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 81 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
82 GNUNET_GETOPT_OPTION_END 82 GNUNET_GETOPT_OPTION_END
83 }; 83 };
84 GNUNET_PROGRAM_run (argc,
85 argv,
86 "gnunet-resolver [hostname]",
87 gettext_noop
88 ("Test GNUnet DNS resolver code."),
89 options, &run, NULL);
90 fprintf (stderr, "again...\n");
91
84 return (GNUNET_OK == 92 return (GNUNET_OK ==
85 GNUNET_PROGRAM_run (argc, 93 GNUNET_PROGRAM_run (argc,
86 argv, 94 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 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2009 Christian Grothoff (and other contributing authors) 3 (C) 2009, 2011 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -224,6 +224,7 @@ void
224GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *c) 224GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *c)
225{ 225{
226 check_config (c); 226 check_config (c);
227 backoff = GNUNET_TIME_UNIT_MILLISECONDS;
227 cfg = c; 228 cfg = c;
228} 229}
229 230
@@ -255,6 +256,7 @@ GNUNET_RESOLVER_disconnect ()
255 GNUNET_SCHEDULER_cancel (s_task); 256 GNUNET_SCHEDULER_cancel (s_task);
256 s_task = GNUNET_SCHEDULER_NO_TASK; 257 s_task = GNUNET_SCHEDULER_NO_TASK;
257 } 258 }
259 cfg = NULL;
258} 260}
259 261
260 262
@@ -707,8 +709,7 @@ reconnect ()
707 r_task = GNUNET_SCHEDULER_add_delayed (backoff, 709 r_task = GNUNET_SCHEDULER_add_delayed (backoff,
708 &reconnect_task, 710 &reconnect_task,
709 NULL); 711 NULL);
710 backoff = GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_SECONDS, 712 backoff = GNUNET_TIME_relative_multiply (backoff, 2);
711 GNUNET_TIME_relative_multiply (backoff, 2));
712} 713}
713 714
714 715