dhtlog updates
[oweals/gnunet.git] / src / util / test_resolver_api.c
index e6496e7acca9ae9fbd44b5e8dc68ac34f4c61de3..2c3f953676ad823fa431828d2baec3c0f9485d72 100644 (file)
@@ -4,7 +4,7 @@
 
  GNUnet is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
+ by the Free Software Foundation; either version 3, or (at your
  option) any later version.
 
  GNUnet is distributed in the hope that it will be useful, but
@@ -222,6 +222,7 @@ static void
 run(void *cls, struct GNUNET_SCHEDULER_Handle *sched, char * const *args,
     const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
+  int *ok = cls;
   struct sockaddr_in sa;
   struct GNUNET_TIME_Relative timeout = GNUNET_TIME_relative_multiply(
       GNUNET_TIME_UNIT_MILLISECONDS, 2500);
@@ -253,7 +254,7 @@ run(void *cls, struct GNUNET_SCHEDULER_Handle *sched, char * const *args,
    * DNS rootserver to test: a.root-servers.net - 198.41.0.4
    */
 
-  char const * rootserver_name = ROOTSERVER_NAME;
+  const char * rootserver_name = ROOTSERVER_NAME;
   struct hostent *rootserver;
 
   rootserver = gethostbyname(rootserver_name);
@@ -267,6 +268,7 @@ run(void *cls, struct GNUNET_SCHEDULER_Handle *sched, char * const *args,
 #endif
       fprintf (stderr,
               "System seems to be off-line, will not run all DNS tests\n");
+      *ok = 0; /* mark test as passing anyway */
       return;
     }