aboutsummaryrefslogtreecommitdiff
path: root/src/arm
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-10-18 14:55:17 +0200
committerChristian Grothoff <christian@grothoff.org>2018-10-18 14:55:17 +0200
commitc7c6446e3ea37531b67252a452937f3578570a57 (patch)
tree25c3e77499bc2bc14bd408ae1414badced015265 /src/arm
parent418bf5953acdba2e325528d739fb115b51b7141f (diff)
downloadgnunet-c7c6446e3ea37531b67252a452937f3578570a57.tar.gz
gnunet-c7c6446e3ea37531b67252a452937f3578570a57.zip
use unique 32-bit IDs for DNS requests to avoid random confusions, handle additional and authoritative records as well
Diffstat (limited to 'src/arm')
-rw-r--r--src/arm/test_gnunet_service_arm.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/arm/test_gnunet_service_arm.c b/src/arm/test_gnunet_service_arm.c
index 8b6d09bd9..fd5244ec2 100644
--- a/src/arm/test_gnunet_service_arm.c
+++ b/src/arm/test_gnunet_service_arm.c
@@ -112,7 +112,7 @@ hostname_resolve_cb (void *cls,
112 if (NULL == addr) 112 if (NULL == addr)
113 { 113 {
114 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 114 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
115 "Name not resolved!\n"); 115 "Failed to resolve our own hostname!\n");
116 GNUNET_break (0); 116 GNUNET_break (0);
117 ret = 3; 117 ret = 3;
118 GNUNET_ARM_request_service_stop (arm, 118 GNUNET_ARM_request_service_stop (arm,
@@ -200,7 +200,7 @@ main (int argc, char *av[])
200 FPRINTF (stderr, 200 FPRINTF (stderr,
201 "%s", 201 "%s",
202 "Failed to determine my own hostname, testcase not run.\n"); 202 "Failed to determine my own hostname, testcase not run.\n");
203 return 0; 203 return 77;
204 } 204 }
205 if ( (0 == strcmp (hostname, 205 if ( (0 == strcmp (hostname,
206 "localhost")) || 206 "localhost")) ||
@@ -210,6 +210,8 @@ main (int argc, char *av[])
210 /* we cannot use 'localhost' as this would not trigger the 210 /* we cannot use 'localhost' as this would not trigger the
211 resolver service (see resolver_api.c); so in this case, 211 resolver service (see resolver_api.c); so in this case,
212 we fall back to (ab)using gnu.org. */ 212 we fall back to (ab)using gnu.org. */
213 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
214 "Falling back to `www.gnu.org'\n");
213 strcpy (hostname, 215 strcpy (hostname,
214 "www.gnu.org"); 216 "www.gnu.org");
215 } 217 }
@@ -224,7 +226,7 @@ main (int argc, char *av[])
224 FPRINTF (stderr, 226 FPRINTF (stderr,
225 "Failed to resolve my hostname `%s', testcase not run.\n", 227 "Failed to resolve my hostname `%s', testcase not run.\n",
226 hostname); 228 hostname);
227 return 0; 229 return 77;
228 } 230 }
229 freeaddrinfo (ai); 231 freeaddrinfo (ai);
230 } 232 }
@@ -240,7 +242,7 @@ main (int argc, char *av[])
240 FPRINTF (stderr, 242 FPRINTF (stderr,
241 "Failed to resolve my hostname `%s', testcase not run.\n", 243 "Failed to resolve my hostname `%s', testcase not run.\n",
242 hostname); 244 hostname);
243 return 0; 245 return 77;
244 } 246 }
245 } 247 }
246#elif HAVE_GETHOSTBYNAME 248#elif HAVE_GETHOSTBYNAME
@@ -253,13 +255,13 @@ main (int argc, char *av[])
253 FPRINTF (stderr, 255 FPRINTF (stderr,
254 "Failed to resolve my hostname `%s', testcase not run.\n", 256 "Failed to resolve my hostname `%s', testcase not run.\n",
255 hostname); 257 hostname);
256 return 0; 258 return 77;
257 } 259 }
258 } 260 }
259#else 261#else
260 FPRINTF (stderr, 262 FPRINTF (stderr,
261 "libc fails to have resolver function, testcase not run.\n"); 263 "libc fails to have resolver function, testcase not run.\n");
262 return 0; 264 return 77;
263#endif 265#endif
264 GNUNET_log_setup ("test-gnunet-service-arm", 266 GNUNET_log_setup ("test-gnunet-service-arm",
265 "WARNING", 267 "WARNING",