diff options
author | Daniel Stenberg <daniel@haxx.se> | 2009-05-12 18:56:33 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2009-05-12 18:56:33 +0000 |
commit | 80d2df7789c904783589a1fc01e3f1be2234741c (patch) | |
tree | 4ba02931038612823be0cc07508717cce26759cf /lib | |
parent | f882a63cbafff3a60da3ce3defb2c545ad8ba350 (diff) |
Reverted my change to use Curl_connected_proxy() here. Clearly I wasn't
thinking straight.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftp.c | 32 |
1 files changed, 27 insertions, 5 deletions
@@ -1890,11 +1890,33 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, /* this just dumps information about this second connection */ ftp_pasv_verbose(conn, conninfo, newhost, connectport); - /* FIX: this MUST wait for a proper connect first if 'connected' is - FALSE to make proxies work properly here! */ - result = Curl_connected_proxy(conn); - if(result) - return result; + switch(data->set.proxytype) { +#ifndef CURL_DISABLE_PROXY + /* FIX: this MUST wait for a proper connect first if 'connected' is + * FALSE */ + case CURLPROXY_SOCKS5: + case CURLPROXY_SOCKS5_HOSTNAME: + result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost, newport, + SECONDARYSOCKET, conn); + break; + case CURLPROXY_SOCKS4: + result = Curl_SOCKS4(conn->proxyuser, newhost, newport, + SECONDARYSOCKET, conn, FALSE); + break; + case CURLPROXY_SOCKS4A: + result = Curl_SOCKS4(conn->proxyuser, newhost, newport, + SECONDARYSOCKET, conn, TRUE); + break; +#endif /* CURL_DISABLE_PROXY */ + case CURLPROXY_HTTP: + case CURLPROXY_HTTP_1_0: + /* do nothing here. handled later. */ + break; + default: + failf(data, "unknown proxytype option given"); + result = CURLE_COULDNT_CONNECT; + break; + } #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY) if(conn->bits.tunnel_proxy && conn->bits.httpproxy) { /* FIX: this MUST wait for a proper connect first if 'connected' is |