mirror of
https://github.com/curl/curl.git
synced 2026-06-07 15:24:19 +03:00
convert CURLFTPSSL_CCC_* to long constants
This commit is contained in:
parent
686d3fed2f
commit
144d201c23
6 changed files with 10 additions and 9 deletions
|
|
@ -63,7 +63,7 @@ int main(void)
|
|||
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
|
||||
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
|
||||
/* go back to clear-text FTP after authenticating */
|
||||
curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, (long)CURLFTPSSL_CCC_ACTIVE);
|
||||
curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_ACTIVE);
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -979,11 +979,12 @@ typedef enum {
|
|||
#endif /* !CURL_NO_OLDIES */
|
||||
|
||||
/* parameter for the CURLOPT_FTP_SSL_CCC option */
|
||||
#define CURLFTPSSL_CCC_NONE 0L /* do not send CCC */
|
||||
#define CURLFTPSSL_CCC_PASSIVE 1L /* Let the server initiate the shutdown */
|
||||
#define CURLFTPSSL_CCC_ACTIVE 2L /* Initiate the shutdown */
|
||||
|
||||
typedef enum {
|
||||
CURLFTPSSL_CCC_NONE, /* do not send CCC */
|
||||
CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */
|
||||
CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */
|
||||
CURLFTPSSL_CCC_LAST /* not an option, never use */
|
||||
CURLFTPSSL_CCC_LAST = 3 /* not an option, never use */
|
||||
} curl_ftpccc;
|
||||
|
||||
/* parameter for the CURLOPT_FTPSSLAUTH option */
|
||||
|
|
|
|||
|
|
@ -653,7 +653,7 @@ static CURLcode ftp_setopts(struct OperationConfig *config, CURL *curl)
|
|||
|
||||
/* new in curl 7.16.1 */
|
||||
if(config->ftp_ssl_ccc)
|
||||
my_setopt_enum(curl, CURLOPT_FTP_SSL_CCC, (long)config->ftp_ssl_ccc_mode);
|
||||
my_setopt_enum(curl, CURLOPT_FTP_SSL_CCC, config->ftp_ssl_ccc_mode);
|
||||
|
||||
my_setopt_str(curl, CURLOPT_FTP_ACCOUNT, config->ftp_account);
|
||||
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ struct OperationConfig {
|
|||
unsigned long timecond;
|
||||
HttpReq httpreq;
|
||||
long proxyver; /* set to CURLPROXY_HTTP* define */
|
||||
int ftp_ssl_ccc_mode;
|
||||
long ftp_ssl_ccc_mode;
|
||||
int ftp_filemethod;
|
||||
enum {
|
||||
CLOBBER_DEFAULT, /* Provides compatibility with previous versions of curl,
|
||||
|
|
|
|||
|
|
@ -635,7 +635,7 @@ int ftpfilemethod(struct OperationConfig *config, const char *str)
|
|||
return CURLFTPMETHOD_MULTICWD;
|
||||
}
|
||||
|
||||
int ftpcccmethod(struct OperationConfig *config, const char *str)
|
||||
long ftpcccmethod(struct OperationConfig *config, const char *str)
|
||||
{
|
||||
if(curl_strequal("passive", str))
|
||||
return CURLFTPSSL_CCC_PASSIVE;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ ParameterError add2list(struct curl_slist **list, const char *ptr);
|
|||
|
||||
int ftpfilemethod(struct OperationConfig *config, const char *str);
|
||||
|
||||
int ftpcccmethod(struct OperationConfig *config, const char *str);
|
||||
long ftpcccmethod(struct OperationConfig *config, const char *str);
|
||||
|
||||
long delegation(struct OperationConfig *config, const char *str);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue