diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-11-03 09:54:12 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-11-03 09:54:12 +0100 |
commit | 93e57d0628aad62330dc62ff809752a0478824c4 (patch) | |
tree | a88c9f4bbedff4c059c6eb837f7abb8582428fbf | |
parent | a873b95c21700e8e75db7e62b5ac5ef8fc8c9b03 (diff) |
rename ftp_ssl: the struct field is used for many protocols
Now called 'use_ssl' instead, which better matches the current CURLOPT
name and since the option is used for all pingpong protocols (at least)
it makes sense to not use 'ftp' in the name.
-rw-r--r-- | lib/ftp.c | 10 | ||||
-rw-r--r-- | lib/imap.c | 2 | ||||
-rw-r--r-- | lib/pop3.c | 2 | ||||
-rw-r--r-- | lib/smtp.c | 6 | ||||
-rw-r--r-- | lib/url.c | 2 | ||||
-rw-r--r-- | lib/urldata.h | 2 |
6 files changed, 12 insertions, 12 deletions
@@ -2493,7 +2493,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) } #endif - if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) { + if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) { /* We don't have a SSL/TLS connection yet, but FTPS is requested. Try a FTPS connection now */ @@ -2549,7 +2549,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) /* remain in this same state */ } else { - if(data->set.ftp_ssl > CURLUSESSL_TRY) + if(data->set.use_ssl > CURLUSESSL_TRY) /* we failed and CURLUSESSL_CONTROL or CURLUSESSL_ALL is set */ result = CURLE_USE_SSL_FAILED; else @@ -2572,7 +2572,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) case FTP_PBSZ: PPSENDF(&ftpc->pp, "PROT %c", - data->set.ftp_ssl == CURLUSESSL_CONTROL ? 'C' : 'P'); + data->set.use_ssl == CURLUSESSL_CONTROL ? 'C' : 'P'); state(conn, FTP_PROT); break; @@ -2581,10 +2581,10 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) if(ftpcode/100 == 2) /* We have enabled SSL for the data connection! */ conn->ssl[SECONDARYSOCKET].use = - (data->set.ftp_ssl != CURLUSESSL_CONTROL) ? TRUE : FALSE; + (data->set.use_ssl != CURLUSESSL_CONTROL) ? TRUE : FALSE; /* FTP servers typically responds with 500 if they decide to reject our 'P' request */ - else if(data->set.ftp_ssl > CURLUSESSL_CONTROL) + else if(data->set.use_ssl > CURLUSESSL_CONTROL) /* we failed and bails out */ return CURLE_USE_SSL_FAILED; diff --git a/lib/imap.c b/lib/imap.c index 986b79a56..ab53c9d74 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -580,7 +580,7 @@ static CURLcode imap_statemach_act(struct connectdata *conn) return CURLE_FTP_WEIRD_SERVER_REPLY; } - if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) { + if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) { /* We don't have a SSL/TLS connection yet, but SSL is requested. Switch to TLS connection now */ const char *str; diff --git a/lib/pop3.c b/lib/pop3.c index cb70679c5..6cda3bc5a 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -521,7 +521,7 @@ static CURLcode pop3_statemach_act(struct connectdata *conn) return CURLE_FTP_WEIRD_SERVER_REPLY; } - if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) { + if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) { /* We don't have a SSL/TLS connection yet, but SSL is requested. Switch to TLS connection now */ result = Curl_pp_sendf(&pop3c->pp, "STLS"); diff --git a/lib/smtp.c b/lib/smtp.c index 8835b07a5..ea6bafaf8 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -507,7 +507,7 @@ static CURLcode smtp_state_starttls_resp(struct connectdata *conn, (void)instate; /* no use for this yet */ if(smtpcode != 220) { - if(data->set.ftp_ssl != CURLUSESSL_TRY) { + if(data->set.use_ssl != CURLUSESSL_TRY) { failf(data, "STARTTLS denied. %c", smtpcode); result = CURLE_LOGIN_DENIED; } @@ -557,7 +557,7 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, (void)instate; /* no use for this yet */ if(smtpcode/100 != 2) { - if((data->set.ftp_ssl <= CURLUSESSL_TRY || conn->ssl[FIRSTSOCKET].use) && + if((data->set.use_ssl <= CURLUSESSL_TRY || conn->ssl[FIRSTSOCKET].use) && !conn->bits.user_passwd) result = smtp_state_helo(conn); else { @@ -565,7 +565,7 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, result = CURLE_LOGIN_DENIED; } } - else if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) { + else if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) { /* We don't have a SSL/TLS connection yet, but SSL is requested. Switch to TLS connection now */ result = Curl_pp_sendf(&conn->proto.smtpc.pp, "STARTTLS"); @@ -2169,7 +2169,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, /* * Make transfers attempt to use SSL/TLS. */ - data->set.ftp_ssl = (curl_usessl)va_arg(param, long); + data->set.use_ssl = (curl_usessl)va_arg(param, long); break; #endif case CURLOPT_FTPSSLAUTH: diff --git a/lib/urldata.h b/lib/urldata.h index 5b3dc059e..3e7db2525 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -1493,7 +1493,7 @@ struct UserDefined { bool ftp_use_eprt; /* if EPRT is to be attempted or not */ bool ftp_use_pret; /* if PRET is to be used before PASV or not */ - curl_usessl ftp_ssl; /* if AUTH TLS is to be attempted etc, for FTP or + curl_usessl use_ssl; /* if AUTH TLS is to be attempted etc, for FTP or IMAP or POP3 or others! */ curl_ftpauth ftpsslauth; /* what AUTH XXX to be attempted */ curl_ftpccc ftp_ccc; /* FTP CCC options */ |