- Constantine Sapuntzakis fixed bug report #2784055

(http://curl.haxx.se/bug/view.cgi?id=2784055) identifying a problem to
  connect to SOCKS proxies when using the multi interface. It turned out to
  almost not work at all previously. We need to wait for the TCP connect to
  be properly verified before doing the SOCKS magic.

  There's still a flaw in the FTP code for this.
This commit is contained in:
Daniel Stenberg
2009-05-08 10:59:40 +00:00
parent 9ef7b6afe2
commit e84c7db049
5 changed files with 70 additions and 35 deletions

View File

@@ -1055,9 +1055,16 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
easy->result = Curl_is_connected(easy->easy_conn,
FIRSTSOCKET,
&connected);
if(connected)
easy->result = Curl_protocol_connect(easy->easy_conn,
&protocol_connect);
if(connected) {
/* see if we need to do any proxy magic first once we connected */
easy->result = Curl_connected_proxy(easy->easy_conn);
if(!easy->result)
/* if everything is still fine we do the protocol-specific connect
setup */
easy->result = Curl_protocol_connect(easy->easy_conn,
&protocol_connect);
}
if(CURLE_OK != easy->result) {
/* failure detected */