Merge pull request #999 from devnexen/packagemanager_req_upd

Introduces the logging of the download progress of the update feed file.
This commit is contained in:
yvt 2022-03-12 12:16:58 +09:00 committed by GitHub
commit c0835132b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());