Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request yvt#999 from devnexen/packagemanager_req_upd
Browse files Browse the repository at this point in the history
Introduces the logging of the download progress of the update feed file.
  • Loading branch information
yvt authored Mar 12, 2022
2 parents d7d467e + 66e7ee9 commit c083513
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/Gui/PackageUpdateManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int (*)(void *, curl_off_t, curl_off_t, curl_off_t, curl_off_t)>(
[](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());

Expand Down

0 comments on commit c083513

Please sign in to comment.