summaryrefslogtreecommitdiff
path: root/tests/server/resolve.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-17 10:27:11 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-17 10:27:11 +0000
commit1f878aee69bf5ec91d71e88d4f1987141978ec5f (patch)
treea52a141793bdebb9fac8745ef54c3f7db9725630 /tests/server/resolve.c
parent84fd4686e2fa9dfed265cdd7a941bc0df1ce4821 (diff)
downloadcurl-1f878aee69bf5ec91d71e88d4f1987141978ec5f.tar.gz
Made test case 241 precheck that the given name resolves to an ipv6 address,
or the test is skipped. Ideally, we should let this test case go over a few frequently used IPv6 localhost aliases...
Diffstat (limited to 'tests/server/resolve.c')
-rw-r--r--tests/server/resolve.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/server/resolve.c b/tests/server/resolve.c
index e1b75e359..84b369e6b 100644
--- a/tests/server/resolve.c
+++ b/tests/server/resolve.c
@@ -125,8 +125,8 @@ int main(int argc, char *argv[])
he = gethostbyname(host);
- printf("Resolve '%s' %s\n",
- host, he?"SUCCESSFUL":"FAILED");
+ if(!he)
+ printf("Resolving '%s' FAILED\n", host);
return he?0:1;
}
@@ -143,8 +143,9 @@ int main(int argc, char *argv[])
hints.ai_flags = AI_CANONNAME;
rc = (getaddrinfo)(host, "80", &hints, &ai);
- printf("Resolve '%s' %s\n",
- host, !rc?"SUCCESSFUL":"FAILED");
+ if(rc)
+ printf("Resolving '%s' FAILED\n", host);
+
return !rc?0:1;
}
#endif