Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
curl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
What's new
5
Snippets
Groups
Projects
gitlab-org
build
omnibus-mirror
curl
Commits
f54fc91c
Unverified
Commit
f54fc91c
authored
10 months ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
multi: do a final progress update on connect failure
To fix timing metric etc Co-authored-by: Justin Maggard Fixes #14204
parent
1f877b0f
Branches
bagder/progress-update
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/multi.c
+1
-0
1 addition, 0 deletions
lib/multi.c
lib/progress.c
+17
-3
17 additions, 3 deletions
lib/progress.c
lib/progress.h
+2
-0
2 additions, 0 deletions
lib/progress.h
with
20 additions
and
3 deletions
lib/multi.c
+
1
−
0
View file @
f54fc91c
...
...
@@ -2643,6 +2643,7 @@ statemachine_end:
else
if
(
data
->
mstate
==
MSTATE_CONNECT
)
{
/* Curl_connect() failed */
(
void
)
Curl_posttransfer
(
data
);
Curl_pgrsUpdate_nometer
(
data
);
}
multistate
(
data
,
MSTATE_COMPLETED
);
...
...
This diff is collapsed.
Click to expand it.
lib/progress.c
+
17
−
3
View file @
f54fc91c
...
...
@@ -587,10 +587,8 @@ static void progress_meter(struct Curl_easy *data)
* Curl_pgrsUpdate() returns 0 for success or the value returned by the
* progress callback!
*/
int
Curl_
pgrs
U
pdate
(
struct
Curl_easy
*
data
)
static
int
pgrs
u
pdate
(
struct
Curl_easy
*
data
,
bool
showprogress
)
{
struct
curltime
now
=
Curl_now
();
/* what time is it */
bool
showprogress
=
progress_calc
(
data
,
now
);
if
(
!
(
data
->
progress
.
flags
&
PGRS_HIDE
))
{
if
(
data
->
set
.
fxferinfo
)
{
int
result
;
...
...
@@ -631,3 +629,19 @@ int Curl_pgrsUpdate(struct Curl_easy *data)
return
0
;
}
int
Curl_pgrsUpdate
(
struct
Curl_easy
*
data
)
{
struct
curltime
now
=
Curl_now
();
/* what time is it */
bool
showprogress
=
progress_calc
(
data
,
now
);
return
pgrsupdate
(
data
,
showprogress
);
}
/*
* Update all progress, do not do progress meter/callbacks.
*/
void
Curl_pgrsUpdate_nometer
(
struct
Curl_easy
*
data
)
{
struct
curltime
now
=
Curl_now
();
/* what time is it */
(
void
)
progress_calc
(
data
,
now
);
}
This diff is collapsed.
Click to expand it.
lib/progress.h
+
2
−
0
View file @
f54fc91c
...
...
@@ -54,6 +54,8 @@ CURLcode Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size);
void
Curl_pgrsSetUploadCounter
(
struct
Curl_easy
*
data
,
curl_off_t
size
);
void
Curl_ratelimit
(
struct
Curl_easy
*
data
,
struct
curltime
now
);
int
Curl_pgrsUpdate
(
struct
Curl_easy
*
data
);
void
Curl_pgrsUpdate_nometer
(
struct
Curl_easy
*
data
);
void
Curl_pgrsResetTransferSizes
(
struct
Curl_easy
*
data
);
struct
curltime
Curl_pgrsTime
(
struct
Curl_easy
*
data
,
timerid
timer
);
timediff_t
Curl_pgrsLimitWaitTime
(
curl_off_t
cursize
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment