923a60
From 575f559bcd992d7fd2d7d46b695b7f42923b4463 Mon Sep 17 00:00:00 2001
923a60
From: Lukas Nykryn <lnykryn@redhat.com>
923a60
Date: Wed, 6 Apr 2016 15:39:09 +0200
923a60
Subject: [PATCH] import: use the old curl api
923a60
923a60
libcurl in rhel does not have CURLOPT_XFERINFO* symbols, so lets use the
923a60
old interface.
923a60
923a60
RHEL-only
923a60
Resolves: #1284974
923a60
---
923a60
 src/import/import-job.c | 6 +++---
923a60
 1 file changed, 3 insertions(+), 3 deletions(-)
923a60
923a60
diff --git a/src/import/import-job.c b/src/import/import-job.c
923a60
index 809486500b..5f9cfd366d 100644
923a60
--- a/src/import/import-job.c
923a60
+++ b/src/import/import-job.c
923a60
@@ -587,7 +587,7 @@ fail:
923a60
         return 0;
923a60
 }
923a60
 
923a60
-static int import_job_progress_callback(void *userdata, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow) {
923a60
+static int import_job_progress_callback(void *userdata, double dltotal, double dlnow, double ultotal, double ulnow) {
923a60
         ImportJob *j = userdata;
923a60
         unsigned percent;
923a60
         usec_t n;
923a60
@@ -714,10 +714,10 @@ int import_job_begin(ImportJob *j) {
923a60
         if (curl_easy_setopt(j->curl, CURLOPT_HEADERDATA, j) != CURLE_OK)
923a60
                 return -EIO;
923a60
 
923a60
-        if (curl_easy_setopt(j->curl, CURLOPT_XFERINFOFUNCTION, import_job_progress_callback) != CURLE_OK)
923a60
+        if (curl_easy_setopt(j->curl, CURLOPT_PROGRESSFUNCTION, import_job_progress_callback) != CURLE_OK)
923a60
                 return -EIO;
923a60
 
923a60
-        if (curl_easy_setopt(j->curl, CURLOPT_XFERINFODATA, j) != CURLE_OK)
923a60
+        if (curl_easy_setopt(j->curl, CURLOPT_PROGRESSDATA, j) != CURLE_OK)
923a60
                 return -EIO;
923a60
 
923a60
         if (curl_easy_setopt(j->curl, CURLOPT_NOPROGRESS, 0) != CURLE_OK)