Skip to content

Commit

Permalink
Merge pull request #12566 from NaN-git/fix-curl-callback
Browse files Browse the repository at this point in the history
libstore: fix curl callback function signature
  • Loading branch information
edolstra authored Feb 25, 2025
2 parents 671d1b0 + b074345 commit 81834e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libstore/filetransfer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ struct curlFileTransfer : public FileTransfer
return ((TransferItem *) userp)->headerCallback(contents, size, nmemb);
}

int progressCallback(double dltotal, double dlnow)
int progressCallback(curl_off_t dltotal, curl_off_t dlnow)
{
try {
act.progress(dlnow, dltotal);
Expand All @@ -271,17 +271,17 @@ struct curlFileTransfer : public FileTransfer
return getInterrupted();
}

int silentProgressCallback(double dltotal, double dlnow)
int silentProgressCallback(curl_off_t dltotal, curl_off_t dlnow)
{
return getInterrupted();
}

static int progressCallbackWrapper(void * userp, double dltotal, double dlnow, double ultotal, double ulnow)
static int progressCallbackWrapper(void * userp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
{
return ((TransferItem *) userp)->progressCallback(dltotal, dlnow);
}

static int silentProgressCallbackWrapper(void * userp, double dltotal, double dlnow, double ultotal, double ulnow)
static int silentProgressCallbackWrapper(void * userp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
{
return ((TransferItem *) userp)->silentProgressCallback(dltotal, dlnow);
}
Expand Down

0 comments on commit 81834e7

Please sign in to comment.