mirror of
https://github.com/curl/curl.git
synced 2026-06-07 13:04:16 +03:00
convert CURLFTPAUTH_* to long constants
This commit is contained in:
parent
36af5cceb1
commit
686d3fed2f
3 changed files with 7 additions and 6 deletions
|
|
@ -61,7 +61,7 @@ int main(void)
|
|||
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
|
||||
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
|
||||
/* funny server, ask for SSL before TLS */
|
||||
curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, (long)CURLFTPAUTH_SSL);
|
||||
curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_SSL);
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -987,11 +987,12 @@ typedef enum {
|
|||
} curl_ftpccc;
|
||||
|
||||
/* parameter for the CURLOPT_FTPSSLAUTH option */
|
||||
#define CURLFTPAUTH_DEFAULT 0L /* let libcurl decide */
|
||||
#define CURLFTPAUTH_SSL 1L /* use "AUTH SSL" */
|
||||
#define CURLFTPAUTH_TLS 2L /* use "AUTH TLS" */
|
||||
|
||||
typedef enum {
|
||||
CURLFTPAUTH_DEFAULT, /* let libcurl decide */
|
||||
CURLFTPAUTH_SSL, /* use "AUTH SSL" */
|
||||
CURLFTPAUTH_TLS, /* use "AUTH TLS" */
|
||||
CURLFTPAUTH_LAST /* not an option, never use */
|
||||
CURLFTPAUTH_LAST = 3 /* not an option, never use */
|
||||
} curl_ftpauth;
|
||||
|
||||
/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
|
|||
*/
|
||||
if((arg < CURLFTPAUTH_DEFAULT) || (arg >= CURLFTPAUTH_LAST))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
data->set.ftpsslauth = (unsigned char)(curl_ftpauth)arg;
|
||||
data->set.ftpsslauth = (unsigned char)arg;
|
||||
break;
|
||||
case CURLOPT_ACCEPTTIMEOUT_MS:
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue