summaryrefslogtreecommitdiff
path: root/lib/asyn-ares.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-02-18 13:14:55 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-02-18 15:02:17 +0100
commit692faeab9f07c23feddc4814e16a138a30cbab06 (patch)
tree0faaf769335ed1ed3c9aca7803c784401d96aefd /lib/asyn-ares.c
parent7db6bc5ecaef321f32639149ba3737b1c8393b9c (diff)
downloadcurl-692faeab9f07c23feddc4814e16a138a30cbab06.tar.gz
asyn-ares: use consistent resolve error message
... with the help of Curl_resolver_error() which now is moved from asyn-thead.c and is provided globally for this purpose. Follow-up to 35ca04ce1b77636 Makes test 1188 work for c-ares builds Closes #6626
Diffstat (limited to 'lib/asyn-ares.c')
-rw-r--r--lib/asyn-ares.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
index 2484a7b49..c9bd9d16a 100644
--- a/lib/asyn-ares.c
+++ b/lib/asyn-ares.c
@@ -384,13 +384,8 @@ CURLcode Curl_resolver_is_resolved(struct Curl_easy *data,
them */
res->temp_ai = NULL;
- if(!data->state.async.dns) {
- failf(data, "Could not resolve: %s (%s)",
- data->state.async.hostname,
- ares_strerror(data->state.async.status));
- result = data->conn->bits.proxy?CURLE_COULDNT_RESOLVE_PROXY:
- CURLE_COULDNT_RESOLVE_HOST;
- }
+ if(!data->state.async.dns)
+ result = Curl_resolver_error(data);
else
*dns = data->state.async.dns;