summaryrefslogtreecommitdiffstats
path: root/0006-curl-7.29.0-25e577b3.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-12-20 09:04:54 +0100
committerRemi Collet <fedora@famillecollet.com>2014-12-20 09:04:54 +0100
commit01d72d81f7e86f9433a81792cd61038506fe0048 (patch)
treed02a2a1ba7ab3e5242d5fe85dc39204a67de1e19 /0006-curl-7.29.0-25e577b3.patch
parent758da2152b096a93ff7e8f80fe1b7d46dcf11159 (diff)
curl: sync with 7.29.0-19 from RHEL-7 (for EL-5)HEADmaster
Diffstat (limited to '0006-curl-7.29.0-25e577b3.patch')
-rw-r--r--0006-curl-7.29.0-25e577b3.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/0006-curl-7.29.0-25e577b3.patch b/0006-curl-7.29.0-25e577b3.patch
new file mode 100644
index 0000000..2b6a786
--- /dev/null
+++ b/0006-curl-7.29.0-25e577b3.patch
@@ -0,0 +1,86 @@
+From 74d01a8e4d48eedc526cffaf6a6bc782b139e068 Mon Sep 17 00:00:00 2001
+From: Kim Vandry <vandry@users.sf.net>
+Date: Mon, 18 Feb 2013 21:36:34 +0100
+Subject: [PATCH 1/2] Curl_resolver_is_resolved: show proper host name on failed resolve
+
+[upstream commit 25e577b33d00afb6630cf2cac98d6baa319e9aef]
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ lib/asyn-thread.c | 35 ++++++++++++++++++++---------------
+ 1 files changed, 20 insertions(+), 15 deletions(-)
+
+diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
+index 7a8294d..c392b21 100644
+--- a/lib/asyn-thread.c
++++ b/lib/asyn-thread.c
+@@ -430,8 +430,19 @@ static const char *gai_strerror(int ecode)
+ * error
+ */
+
+-static void resolver_error(struct connectdata *conn, const char *host_or_proxy)
++static CURLcode resolver_error(struct connectdata *conn)
+ {
++ const char *host_or_proxy;
++ CURLcode rc;
++ if(conn->bits.httpproxy) {
++ host_or_proxy = "proxy";
++ rc = CURLE_COULDNT_RESOLVE_PROXY;
++ }
++ else {
++ host_or_proxy = "host";
++ rc = CURLE_COULDNT_RESOLVE_HOST;
++ }
++
+ failf(conn->data, "Could not resolve %s: %s; %s", host_or_proxy,
+ conn->async.hostname,
+ #ifdef HAVE_GAI_STRERROR
+@@ -442,6 +453,7 @@ static void resolver_error(struct connectdata *conn, const char *host_or_proxy)
+ Curl_strerror(conn, conn->async.status)
+ #endif
+ );
++ return rc;
+ }
+
+ /*
+@@ -473,17 +485,9 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
+ if(entry)
+ *entry = conn->async.dns;
+
+- if(!conn->async.dns) {
+- /* a name was not resolved */
+- if(conn->bits.httpproxy) {
+- resolver_error(conn, "proxy");
+- rc = CURLE_COULDNT_RESOLVE_PROXY;
+- }
+- else {
+- resolver_error(conn, "host");
+- rc = CURLE_COULDNT_RESOLVE_HOST;
+- }
+- }
++ if(!conn->async.dns)
++ /* a name was not resolved, report error */
++ rc = resolver_error(conn);
+
+ destroy_async_data(&conn->async);
+
+@@ -518,12 +522,13 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+
+ if(done) {
+ getaddrinfo_complete(conn);
+- destroy_async_data(&conn->async);
+
+ if(!conn->async.dns) {
+- resolver_error(conn, "host");
+- return CURLE_COULDNT_RESOLVE_HOST;
++ CURLcode rc = resolver_error(conn);
++ destroy_async_data(&conn->async);
++ return rc;
+ }
++ destroy_async_data(&conn->async);
+ *entry = conn->async.dns;
+ }
+ else {
+--
+1.7.1
+