chore(3p/nix/libstore): Remove progress bar remnants from download

This commit is contained in:
Vincent Ambo 2020-05-24 23:36:49 +01:00
parent f5aaa12f1d
commit b371821db5

View file

@ -215,21 +215,6 @@ struct CurlDownloader : public Downloader {
return ((DownloadItem*)userp)->headerCallback(contents, size, nmemb); return ((DownloadItem*)userp)->headerCallback(contents, size, nmemb);
} }
static int progressCallback(double dltotal, double dlnow) {
try {
// TODO(tazjin): this had activity nonsense, clean it up
} catch (nix::Interrupted&) {
assert(_isInterrupted);
}
return static_cast<int>(_isInterrupted);
}
static int progressCallbackWrapper(void* userp, double dltotal,
double dlnow, double ultotal,
double ulnow) {
return ((DownloadItem*)userp)->progressCallback(dltotal, dlnow);
}
static int debugCallback(CURL* handle, curl_infotype type, char* data, static int debugCallback(CURL* handle, curl_infotype type, char* data,
size_t size, void* userptr) { size_t size, void* userptr) {
if (type == CURLINFO_TEXT) { if (type == CURLINFO_TEXT) {
@ -298,10 +283,6 @@ struct CurlDownloader : public Downloader {
DownloadItem::headerCallbackWrapper); DownloadItem::headerCallbackWrapper);
curl_easy_setopt(req, CURLOPT_HEADERDATA, this); curl_easy_setopt(req, CURLOPT_HEADERDATA, this);
curl_easy_setopt(req, CURLOPT_PROGRESSFUNCTION, progressCallbackWrapper);
curl_easy_setopt(req, CURLOPT_PROGRESSDATA, this);
curl_easy_setopt(req, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt(req, CURLOPT_HTTPHEADER, requestHeaders); curl_easy_setopt(req, CURLOPT_HTTPHEADER, requestHeaders);
if (request.head) { if (request.head) {