aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-02 15:53:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-02 15:53:50 +0000
commite1d541086c457eb22ac130fcbaad26014e069d23 (patch)
treee6aeb6a81a1b92f202c0b7e4f7d86d291dcca143 /lib
parent3b0f52205d9fbeb6c56c057b0b555cab9ee75992 (diff)
Dirk Manske fixed the ares usage even more. We could get a timeout from ares
as well, and when failing and not getting a timeout we now include the error message ares can provide us with.
Diffstat (limited to 'lib')
-rw-r--r--lib/hostip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 2a709560c..015825c92 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -534,12 +534,14 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn,
if(!conn->async.dns) {
/* a name was not resolved */
- if(timedout) {
+ if(timedout || (conn->async.status == ARES_ETIMEOUT)) {
failf(data, "Resolving host timed out: %s", conn->name);
rc = CURLE_OPERATION_TIMEDOUT;
}
else if(conn->async.done) {
- failf(data, "Could not resolve host: %s", conn->name);
+ char **dummy=NULL; /* stupid never-used ares-thing */
+ failf(data, "Could not resolve host: %s (%s)", conn->name,
+ ares_strerror(conn->async.status, dummy));
rc = CURLE_COULDNT_RESOLVE_HOST;
}
else