diff options
author | Yang Tse <yangsita@gmail.com> | 2012-04-18 21:03:20 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-04-18 21:03:20 +0200 |
commit | ce8a321dd0c1f06dea1b8edf7b1b76e9672caaeb (patch) | |
tree | be7e26b5d0e27e27a6b67990dd2e8b36abd9291b /src | |
parent | 3833765ba5f77e74ce1d82d761b1c45ca2b32fbb (diff) |
Some explicit conversion to 'long' of curl_easy_setopt() third argument
Explicit conversion to 'long' of curl_easy_setopt() third argument for options
CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH given that this is how its bitmasks are
docummented to be used.
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_operate.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index bbefa8298..8c544194a 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -841,15 +841,20 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) /* new in libcurl 7.10.6 */ if(config->proxyanyauth) - my_setopt_flags(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY); + my_setopt_flags(curl, CURLOPT_PROXYAUTH, + (long) CURLAUTH_ANY); else if(config->proxynegotiate) - my_setopt_flags(curl, CURLOPT_PROXYAUTH, CURLAUTH_GSSNEGOTIATE); + my_setopt_flags(curl, CURLOPT_PROXYAUTH, + (long) CURLAUTH_GSSNEGOTIATE); else if(config->proxyntlm) - my_setopt_flags(curl, CURLOPT_PROXYAUTH, CURLAUTH_NTLM); + my_setopt_flags(curl, CURLOPT_PROXYAUTH, + (long) CURLAUTH_NTLM); else if(config->proxydigest) - my_setopt_flags(curl, CURLOPT_PROXYAUTH, CURLAUTH_DIGEST); + my_setopt_flags(curl, CURLOPT_PROXYAUTH, + (long) CURLAUTH_DIGEST); else if(config->proxybasic) - my_setopt_flags(curl, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); + my_setopt_flags(curl, CURLOPT_PROXYAUTH, + (long) CURLAUTH_BASIC); /* new in libcurl 7.19.4 */ my_setopt(curl, CURLOPT_NOPROXY, config->noproxy); @@ -914,7 +919,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) /* new in libcurl 7.10.6 (default is Basic) */ if(config->authtype) - my_setopt_flags(curl, CURLOPT_HTTPAUTH, config->authtype); + my_setopt_flags(curl, CURLOPT_HTTPAUTH, (long) config->authtype); /* curl 7.19.1 (the 301 version existed in 7.18.2), 303 was added in 7.26.0 */ |