mirror of
https://github.com/curl/curl.git
synced 2026-08-24 19:13:39 +03:00
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
This commit is contained in:
parent
9b879160df
commit
7cf18b05e0
5 changed files with 27 additions and 11 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue