aboutsummaryrefslogtreecommitdiff
path: root/lib/progress.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-03-10 12:11:21 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-03-10 12:11:21 +0000
commitdbaf4f93615b0ad1f34b38ec9def0b30496658d7 (patch)
treeb9299f0d71a7593ffc31201f5955d3f59076b6f1 /lib/progress.c
parent433575068c60d107beb566259f061a66e529b581 (diff)
- Bryan Henderson introduces two things:
1) the progress callback gets called more frequently (at times) 2) libcurl *might* call the callback when it receives a signal
Diffstat (limited to 'lib/progress.c')
-rw-r--r--lib/progress.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/progress.c b/lib/progress.c
index 5ba829a03..65bd4a7bb 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -280,9 +280,6 @@ int Curl_pgrsUpdate(struct connectdata *conn)
((double)data->progress.uploaded/
(data->progress.timespent>0?data->progress.timespent:1));
- if(data->progress.lastshow == Curl_tvlong(now))
- return 0; /* never update this more than once a second if the end isn't
- reached */
data->progress.lastshow = now.tv_sec;
/* Let's do the "current speed" thing, which should use the fastest
@@ -359,6 +356,10 @@ int Curl_pgrsUpdate(struct connectdata *conn)
return result;
}
+ if(data->progress.lastshow == Curl_tvlong(now))
+ return 0; /* never update this more than once a second if the end isn't
+ reached */
+
/* Figure out the estimated time of arrival for the upload */
if((data->progress.flags & PGRS_UL_SIZE_KNOWN) &&
(data->progress.ulspeed>0) &&