diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-01-09 09:01:41 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-01-11 09:46:31 +0000 |
commit | b0684feb0a1f012adaa9bb21bf730bf90601e9d9 (patch) | |
tree | 589d4c5b0fc9308dd75e86a98e28357060f0b99a | |
parent | tdf#103956: RTF import: fix for \cellx0 or no params. (diff) | |
download | core-b0684feb0a1f012adaa9bb21bf730bf90601e9d9.tar.gz core-b0684feb0a1f012adaa9bb21bf730bf90601e9d9.zip |
Fix deprecated Curl elements for update part
Change-Id: Ide008c8a80800b33c8104ec3d697e836fae73827
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145186
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit 6410fafc6f4d58062d82f86549303f4ae2eec32a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145223
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | desktop/source/app/updater.cxx | 2 | ||||
-rw-r--r-- | extensions/source/update/check/download.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx index e0d5bcd832b5..9f60a64d7235 100644 --- a/desktop/source/app/updater.cxx +++ b/desktop/source/app/updater.cxx @@ -563,7 +563,7 @@ std::string download_content(const OString& rURL, bool bFile, OUString& rHash) curl_easy_setopt(curl.get(), CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1); // follow redirects // only allow redirect to http:// and https:// - curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); + curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS_STR, CURLPROTO_HTTP | CURLPROTO_HTTPS); std::string response_body; utl::TempFileNamed aTempFile; diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index 387c1efd7a4f..3b76f9cc8a27 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -61,7 +61,7 @@ static void openFile( OutData& out ) curl_easy_getinfo(out.curl, CURLINFO_EFFECTIVE_URL, &effective_url); double fDownloadSize; - curl_easy_getinfo(out.curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &fDownloadSize); + curl_easy_getinfo(out.curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &fDownloadSize); OString aURL(effective_url); @@ -233,7 +233,7 @@ static bool curl_run(std::u16string_view rURL, OutData& out, const OString& aPro // enable redirection (void)curl_easy_setopt(pCURL, CURLOPT_FOLLOWLOCATION, 1); // only allow redirect to http:// and https:// - (void)curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); + (void)curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS_STR, CURLPROTO_HTTP | CURLPROTO_HTTPS); // write function (void)curl_easy_setopt(pCURL, CURLOPT_WRITEDATA, &out); @@ -241,7 +241,7 @@ static bool curl_run(std::u16string_view rURL, OutData& out, const OString& aPro // progress handler - Condition::check unfortunately is not defined const (void)curl_easy_setopt(pCURL, CURLOPT_NOPROGRESS, 0); - (void)curl_easy_setopt(pCURL, CURLOPT_PROGRESSFUNCTION, &progress_callback); + (void)curl_easy_setopt(pCURL, CURLOPT_XFERINFOFUNCTION, &progress_callback); (void)curl_easy_setopt(pCURL, CURLOPT_PROGRESSDATA, &out); // proxy @@ -275,7 +275,7 @@ static bool curl_run(std::u16string_view rURL, OutData& out, const OString& aPro // this sometimes happens, when a user throws away his user data, but has already // completed the download of an update. double fDownloadSize; - curl_easy_getinfo( pCURL, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &fDownloadSize ); + curl_easy_getinfo( pCURL, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &fDownloadSize ); if ( -1 == fDownloadSize ) { out.Handler->downloadFinished(out.File); |