aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-03-07 22:28:08 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-03-07 22:28:08 +0000
commitb8c8e7349fef49e9027080632e9581f0c76d974b (patch)
treeaf7e621727b00ccea50e24a1fffc2a82e1fb5a41 /lib/ftp.c
parent8bba99ae56ec15b12daf7f7c851cc178f69e749f (diff)
Peter Heuchert made sure the CURLFTPSSL_CONTROL setting for CURLOPT_FTP_SSL
is used properly.
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index da2aeb9e2..3d29b349f 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2456,7 +2456,8 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
2)Private (requested by 'PROT P')
*/
if(!conn->ssl[SECONDARYSOCKET].use) {
- NBFTPSENDF(conn, "PROT %c", 'P');
+ NBFTPSENDF(conn, "PROT %c",
+ data->set.ftp_ssl == CURLFTPSSL_CONTROL ? 'C' : 'P');
state(conn, FTP_PROT);
}
else {
@@ -2470,7 +2471,8 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
case FTP_PROT:
if(ftpcode/100 == 2)
/* We have enabled SSL for the data connection! */
- conn->ssl[SECONDARYSOCKET].use = TRUE;
+ conn->ssl[SECONDARYSOCKET].use =
+ data->set.ftp_ssl > CURLFTPSSL_CONTROL;
/* FTP servers typically responds with 500 if they decide to reject
our 'P' request */
else if(data->set.ftp_ssl> CURLFTPSSL_CONTROL)