PATCH: fix deprecation warnings regarding curl
parent
6213f46ca3
commit
3119e412a7
|
@ -499,8 +499,8 @@ static int curl_init_state(BDRVCURLState *s, CURLState *state)
|
||||||
* Restricting protocols is only supported from 7.19.4 upwards.
|
* Restricting protocols is only supported from 7.19.4 upwards.
|
||||||
*/
|
*/
|
||||||
#if LIBCURL_VERSION_NUM >= 0x071304
|
#if LIBCURL_VERSION_NUM >= 0x071304
|
||||||
curl_easy_setopt(state->curl, CURLOPT_PROTOCOLS, PROTOCOLS);
|
curl_easy_setopt(state->curl, CURLOPT_PROTOCOLS_STR, PROTOCOLS);
|
||||||
curl_easy_setopt(state->curl, CURLOPT_REDIR_PROTOCOLS, PROTOCOLS);
|
curl_easy_setopt(state->curl, CURLOPT_REDIR_PROTOCOLS_STR, PROTOCOLS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_VERBOSE
|
#ifdef DEBUG_VERBOSE
|
||||||
|
@ -769,7 +769,7 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
|
||||||
curl_easy_setopt(state->curl, CURLOPT_HEADERDATA, s);
|
curl_easy_setopt(state->curl, CURLOPT_HEADERDATA, s);
|
||||||
if (curl_easy_perform(state->curl))
|
if (curl_easy_perform(state->curl))
|
||||||
goto out;
|
goto out;
|
||||||
if (curl_easy_getinfo(state->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d)) {
|
if (curl_easy_getinfo(state->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &d)) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
/* Prior CURL 7.19.4 return value of 0 could mean that the file size is not
|
/* Prior CURL 7.19.4 return value of 0 could mean that the file size is not
|
||||||
|
|
Loading…
Reference in New Issue