summaryrefslogtreecommitdiff
path: root/lib/asyn-ares.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-12-05 12:44:55 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-12-05 12:44:55 +0100
commitc50dbf670f5780db7658bb15f5d24c8706202584 (patch)
tree4f2694ef7c6263b5471cf9a5cb1965c4c55015dc /lib/asyn-ares.c
parent0cf05af744a76f2411ea907d8ec4e929bd945245 (diff)
downloadcurl-c50dbf670f5780db7658bb15f5d24c8706202584.tar.gz
Curl_resolver_is_resolved: differentiate between host/proxy errors
As there are different return codes for host vs proxy errors, this function now properly returns the code properly depending on what was attempted to get resolved. Bug: http://curl.haxx.se/mail/archive-2011-12/0010.html Reported by: Jason Liu
Diffstat (limited to 'lib/asyn-ares.c')
-rw-r--r--lib/asyn-ares.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
index f08a4d884..9f16e39f1 100644
--- a/lib/asyn-ares.c
+++ b/lib/asyn-ares.c
@@ -331,9 +331,12 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
res->temp_ai = NULL;
destroy_async_data(&conn->async);
if(!conn->async.dns) {
- failf(data, "Could not resolve host: %s (%s)", conn->host.dispname,
+ failf(data, "Could not resolve %s: %s (%s)",
+ conn->bits.proxy?"proxy":"host",
+ conn->host.dispname,
ares_strerror(conn->async.status));
- return CURLE_COULDNT_RESOLVE_HOST;
+ return conn->bits.proxy?CURLE_COULDNT_RESOLVE_PROXY:
+ CURLE_COULDNT_RESOLVE_HOST;
}
*dns = conn->async.dns;
}