From 66e7ee9f8d7df14f0be8e38742d726c677d91fe1 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 18 Feb 2022 19:33:41 +0000 Subject: [PATCH] package manager update proposal. logging progress. --- Sources/Gui/PackageUpdateManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Sources/Gui/PackageUpdateManager.cpp b/Sources/Gui/PackageUpdateManager.cpp index 4b44ed6a8..41311014d 100644 --- a/Sources/Gui/PackageUpdateManager.cpp +++ b/Sources/Gui/PackageUpdateManager.cpp @@ -140,6 +140,14 @@ namespace spades { })); curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &responseBuffer); curl_easy_setopt(curl.get(), CURLOPT_USERAGENT, OpenSpades_VER_STR); + curl_easy_setopt(curl.get(), CURLOPT_NOPROGRESS, 0); + curl_easy_setopt( + curl.get(), CURLOPT_XFERINFOFUNCTION, + static_cast( + [](void *, curl_off_t total, curl_off_t downloaded, curl_off_t, curl_off_t) -> int { + SPLog("Downloaded %zd bytes/%zd bytes", downloaded, total); + return 0; + })); m_parent.SetupCURLRequest(curl.get());