summaryrefslogtreecommitdiff
path: root/lib/progress.c
diff options
context:
space:
mode:
authorJohn Schroeder <john@schroederspace.com>2019-11-26 09:13:11 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-11-26 09:16:01 +0100
commit7cf18b05e04bbb0f08c74d2567b0648f6c31a952 (patch)
treec6d18fd236a094a1e2c49d88619da797947a2ee7 /lib/progress.c
parent9b879160df01e7ddbb4770904391d3b74114302b (diff)
downloadcurl-7cf18b05e04bbb0f08c74d2567b0648f6c31a952.tar.gz
XFERINFOFUNCTION: support CURL_PROGRESSFUNC_CONTINUE
(also for PROGRESSFUNCTION) By returning this value from the callback, the internal progress function call is still called afterward. Closes #4599
Diffstat (limited to 'lib/progress.c')
-rw-r--r--lib/progress.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/progress.c b/lib/progress.c
index 2aa929599..60a941ab2 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -594,11 +594,13 @@ int Curl_pgrsUpdate(struct connectdata *conn)
data->progress.size_ul,
data->progress.uploaded);
Curl_set_in_callback(data, false);
- if(result)
- failf(data, "Callback aborted");
- return result;
+ if(result != CURL_PROGRESSFUNC_CONTINUE) {
+ if(result)
+ failf(data, "Callback aborted");
+ return result;
+ }
}
- if(data->set.fprogress) {
+ else if(data->set.fprogress) {
int result;
/* The older deprecated callback is set, call that */
Curl_set_in_callback(data, true);
@@ -608,9 +610,11 @@ int Curl_pgrsUpdate(struct connectdata *conn)
(double)data->progress.size_ul,
(double)data->progress.uploaded);
Curl_set_in_callback(data, false);
- if(result)
- failf(data, "Callback aborted");
- return result;
+ if(result != CURL_PROGRESSFUNC_CONTINUE) {
+ if(result)
+ failf(data, "Callback aborted");
+ return result;
+ }
}
if(showprogress)