From: Daniel Stenberg Date: Fri, 16 Apr 2010 20:58:04 +0000 (+0200) Subject: SOCKS5: when name resolves fail return immediately X-Git-Tag: curl-7_21_0~144^2~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=520cee3fb7319eb44d226aaaab9688ae91bc3278;p=thirdparty%2Fcurl.git SOCKS5: when name resolves fail return immediately This makes the code flow more obvious and reacts on the return code properly, even if the code acted the same way before. --- diff --git a/lib/socks.c b/lib/socks.c index eb79567981..0b051545c4 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -597,9 +597,12 @@ CURLcode Curl_SOCKS5(const char *proxy_name, if(rc == CURLRESOLV_ERROR) return CURLE_COULDNT_RESOLVE_HOST; - if(rc == CURLRESOLV_PENDING) + if(rc == CURLRESOLV_PENDING) { /* this requires that we're in "wait for resolve" state */ rc = Curl_wait_for_resolv(conn, &dns); + if(rc) + return rc; + } /* * We cannot use 'hostent' as a struct that Curl_resolv() returns. It