diff options
Diffstat (limited to 'libs/libcurl/src/ftp.c')
-rw-r--r-- | libs/libcurl/src/ftp.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/libcurl/src/ftp.c b/libs/libcurl/src/ftp.c index 2c667a5799..8682e56988 100644 --- a/libs/libcurl/src/ftp.c +++ b/libs/libcurl/src/ftp.c @@ -1146,7 +1146,7 @@ static CURLcode ftp_state_use_port(struct Curl_easy *data, #ifdef USE_IPV6
if(!conn->bits.ftp_use_eprt && conn->bits.ipv6)
- /* EPRT is disabled but we are connected to a IPv6 host, so we ignore the
+ /* EPRT is disabled but we are connected to an IPv6 host, so we ignore the
request and enable EPRT again! */
conn->bits.ftp_use_eprt = TRUE;
#endif
@@ -1278,7 +1278,7 @@ static CURLcode ftp_state_use_pasv(struct Curl_easy *data, #ifdef 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
+ /* EPSV is disabled but we are connected to an IPv6 host, so we ignore the
request and enable EPSV again! */
conn->bits.ftp_use_epsv = TRUE;
#endif
@@ -1752,8 +1752,7 @@ static CURLcode ftp_epsv_disable(struct Curl_easy *data, infof(data, "Failed EPSV attempt. Disabling EPSV");
/* disable it for next transfer */
conn->bits.ftp_use_epsv = FALSE;
- Curl_conn_close(data, SECONDARYSOCKET);
- Curl_conn_cf_discard_all(data, conn, SECONDARYSOCKET);
+ close_secondarysocket(data, ftpc);
data->state.errorbuf = FALSE; /* allow error message to get
rewritten */
result = Curl_pp_sendf(data, &ftpc->pp, "%s", "PASV");
@@ -2716,8 +2715,8 @@ static CURLcode ftp_pp_statemachine(struct Curl_easy *data, #endif
if(data->set.use_ssl && !conn->bits.ftp_use_control_ssl) {
- /* We do not have a SSL/TLS control connection yet, but FTPS is
- requested. Try a FTPS connection now */
+ /* We do not have an SSL/TLS control connection yet, but FTPS is
+ requested. Try an FTPS connection now */
ftpc->count3 = 0;
switch(data->set.ftpsslauth) {
@@ -3322,7 +3321,7 @@ static CURLcode ftp_done(struct Curl_easy *data, CURLcode status, shutdown(conn->sock[SECONDARYSOCKET], 2); /* SD_BOTH */
#endif
- if(conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD) {
+ if(Curl_conn_is_setup(conn, SECONDARYSOCKET)) {
if(!result && ftpc->dont_check && data->req.maxdownload > 0) {
/* partial download completed */
result = Curl_pp_sendf(data, pp, "%s", "ABOR");
|