diff options
Diffstat (limited to 'lib/ftp.c')
-rw-r--r-- | lib/ftp.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -179,7 +179,8 @@ const struct Curl_handler Curl_handler_ftp = { ZERO_NULL, /* perform_getsock */ ftp_disconnect, /* disconnect */ PORT_FTP, /* defport */ - PROT_FTP /* protocol */ + PROT_FTP, /* protocol */ + PROTOPT_DUAL | PROTOPT_CLOSEACTION /* flags */ }; @@ -202,7 +203,8 @@ const struct Curl_handler Curl_handler_ftps = { ZERO_NULL, /* perform_getsock */ ftp_disconnect, /* disconnect */ PORT_FTPS, /* defport */ - PROT_FTP | PROT_FTPS | PROT_SSL /* protocol */ + PROT_FTP | PROT_FTPS, /* protocol */ + PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION /* flags */ }; #endif @@ -225,7 +227,8 @@ static const struct Curl_handler Curl_handler_ftp_proxy = { ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ PORT_FTP, /* defport */ - PROT_HTTP /* protocol */ + PROT_HTTP, /* protocol */ + PROTOPT_NONE /* flags */ }; @@ -248,7 +251,8 @@ static const struct Curl_handler Curl_handler_ftps_proxy = { ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ PORT_FTPS, /* defport */ - PROT_HTTP /* protocol */ + PROT_HTTP, /* protocol */ + PROTOPT_NONE /* flags */ }; #endif #endif @@ -2480,7 +2484,6 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) /* Curl_ssl_connect is BLOCKING */ result = Curl_ssl_connect(conn, FIRSTSOCKET); if(CURLE_OK == result) { - conn->protocol |= PROT_FTPS; conn->ssl[SECONDARYSOCKET].use = FALSE; /* clear-text data */ result = ftp_state_user(conn); } @@ -2949,7 +2952,7 @@ static CURLcode ftp_connect(struct connectdata *conn, } #endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */ - if(conn->protocol & PROT_FTPS) { + if(conn->handler->protocol & PROT_FTPS) { /* BLOCKING */ /* FTPS is simply ftp with SSL for the control channel */ /* now, perform the SSL initialization for this socket */ |