summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2024-03-29 09:18:25 +0100
committerLars-Dominik Braun <lars@6xq.net>2024-03-29 09:18:25 +0100
commitb11ba4321b2befda999f3493d1df6fcb59ee7607 (patch)
tree36b19b9e58b5331282969f15a7d830c055101a6f
parent89374a1c76f23816d1998c0f62930027e5a8ffd2 (diff)
downloadpianobar-b11ba4321b2befda999f3493d1df6fcb59ee7607.tar.gz
pianobar-b11ba4321b2befda999f3493d1df6fcb59ee7607.tar.bz2
pianobar-b11ba4321b2befda999f3493d1df6fcb59ee7607.zip
ui: Replace deprecated libcurl function.
Bumps required curl version up to 7.32.0.
-rw-r--r--INSTALL2
-rw-r--r--src/ui.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/INSTALL b/INSTALL
index 2d36705..e170823 100644
--- a/INSTALL
+++ b/INSTALL
@@ -7,7 +7,7 @@ Dependencies
- gmake
- pthreads
- libao
-- libcurl
+- libcurl>=7.32.0
- gcrypt[1]
- json-c
- ffmpeg>=3.3 [2]
diff --git a/src/ui.c b/src/ui.c
index 2b28e62..0c7386a 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -161,8 +161,8 @@ static size_t httpFetchCb (char *ptr, size_t size, size_t nmemb,
/* libcurl progress callback. aborts the current request if user pressed ^C
*/
-int progressCb (void * const data, double dltotal, double dlnow,
- double ultotal, double ulnow) {
+int progressCb (void * const data, curl_off_t dltotal, curl_off_t dlnow,
+ curl_off_t ultotal, curl_off_t ulnow) {
const sig_atomic_t lint = *((sig_atomic_t *) data);
if (lint) {
return 1;
@@ -224,8 +224,8 @@ static CURLcode BarPianoHttpRequest (CURL * const http,
setAndCheck (CURLOPT_POSTFIELDS, req->postData);
setAndCheck (CURLOPT_WRITEFUNCTION, httpFetchCb);
setAndCheck (CURLOPT_WRITEDATA, &buffer);
- setAndCheck (CURLOPT_PROGRESSFUNCTION, progressCb);
- setAndCheck (CURLOPT_PROGRESSDATA, &lint);
+ setAndCheck (CURLOPT_XFERINFOFUNCTION, progressCb);
+ setAndCheck (CURLOPT_XFERINFODATA, &lint);
setAndCheck (CURLOPT_NOPROGRESS, 0);
setAndCheck (CURLOPT_POST, 1);
setAndCheck (CURLOPT_TIMEOUT, settings->timeout);