From 8e73e553367730c6f4edebd40d723ae7319092a6 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Thu, 6 May 2004 11:10:51 +0000
Subject: [PATCH] Michael Benedict brought a fix that fills in the errorbuffer
 properly when ares fails to resolve a name. This was fixed before but somehow
 has fallen out again!

---
 lib/hostares.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/hostares.c b/lib/hostares.c
index 35640d5b77..02212a2c36 100644
--- a/lib/hostares.c
+++ b/lib/hostares.c
@@ -151,8 +151,11 @@ CURLcode Curl_is_resolved(struct connectdata *conn,
 
   if(conn->async.done) {
     /* we're done, kill the ares handle */
-    if(!conn->async.dns)
+    if(!conn->async.dns) {
+      failf(data, "Could not resolve host: %s (%s)", conn->name,
+            ares_strerror(conn->async.status));
       return CURLE_COULDNT_RESOLVE_HOST;
+    }
     *dns = conn->async.dns;
   }
 
-- 
GitLab