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