-only trigger check config if we actually need it
authorChristian Grothoff <christian@grothoff.org>
Tue, 28 Jun 2016 13:20:01 +0000 (13:20 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 28 Jun 2016 13:20:01 +0000 (13:20 +0000)
src/util/resolver_api.c

index ba9a6cd71deaf7039ec6e20982994399ba243234..9be7014c2d1ce2662f19e829b5a49e2805d3c18f 100644 (file)
@@ -240,7 +240,6 @@ GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
   GNUNET_assert (NULL != cfg);
   backoff = GNUNET_TIME_UNIT_MILLISECONDS;
   resolver_cfg = cfg;
-  (void) check_config ();
 }
 
 
@@ -873,6 +872,11 @@ GNUNET_RESOLVER_ip_get (const char *hostname,
                                            rh);
       return rh;
     }
+  if (GNUNET_OK != check_config ())
+  {
+    GNUNET_free (rh);
+    return NULL;
+  }
   rh->task = GNUNET_SCHEDULER_add_delayed (timeout,
                                            &handle_lookup_timeout,
                                            rh);