diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-01-29 13:07:16 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-01-29 13:07:16 +0000 |
commit | c4ff5eb0ca9322a6671d581e80e0c63085b21426 (patch) | |
tree | 03874f63e536a826cd2eb6f677505aaf38b40184 /lib/ftp.c | |
parent | 0859cd24440d5d3fe49b4a68da70eb14ce08d950 (diff) |
conn->ip_addr MUST NOT be used on re-used connections
Diffstat (limited to 'lib/ftp.c')
-rw-r--r-- | lib/ftp.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -1226,12 +1226,10 @@ CURLcode ftp_use_port(struct connectdata *conn) } #ifdef PF_INET6 - if(!conn->bits.ftp_use_eprt && - (conn->ip_addr->ai_family == PF_INET6)) { + if(!conn->bits.ftp_use_eprt && conn->bits.ipv6) /* EPRT is disabled but we are connected to a IPv6 host, so we ignore the - request! */ + request and enable EPRT again! */ conn->bits.ftp_use_eprt = TRUE; - } #endif for (fcmd = EPRT; fcmd != DONE; fcmd++) { @@ -1563,12 +1561,10 @@ CURLcode ftp_use_pasv(struct connectdata *conn, char newhost[NEWHOST_BUFSIZE]; #ifdef PF_INET6 - if(!conn->bits.ftp_use_epsv && - (conn->ip_addr->ai_family == PF_INET6)) { + if(!conn->bits.ftp_use_epsv && conn->bits.ipv6) /* EPSV is disabled but we are connected to a IPv6 host, so we ignore the - request! */ + request and enable EPSV again! */ conn->bits.ftp_use_epsv = TRUE; - } #endif for (modeoff = (conn->bits.ftp_use_epsv?0:1); @@ -1653,7 +1649,7 @@ CURLcode ftp_use_pasv(struct connectdata *conn, newport = num; /* We must use the same IP we are already connected to */ - Curl_printable_address(conn->ip_addr, newhost, NEWHOST_BUFSIZE); + snprintf(newhost, NEWHOST_BUFSIZE, "%s", conn->ip_addr_str); } } else |