===================================================================
RCS file: /cvsroot/curl/curl/lib/progress.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- curl/lib/progress.c 2007/03/23 04:23:53 1.83
+++ curl/lib/progress.c 2007/04/18 20:02:41 1.84
@@ -245,6 +245,7 @@
long ulestimate=0;
long dlestimate=0;
long total_estimate;
+ bool shownow=FALSE;
now = Curl_tvnow(); /* what time is it */
@@ -266,6 +267,7 @@
/* Calculations done at most once a second, unless end is reached */
if(data->progress.lastshow != (long)now.tv_sec) {
+ shownow = TRUE;
data->progress.lastshow = now.tv_sec;
@@ -346,7 +348,12 @@
return result;
}
- /* If there's no external callback set, use internal code to show progress */
+ if(!shownow)
+ /* only show the internal progress meter once per second */
+ return 0;
+
+ /* If there's no external callback set, use internal code to show
+ progress */
if(!(data->progress.flags & PGRS_HEADERS_OUT)) {
if(data->reqdata.resume_from) {
@@ -422,7 +429,7 @@
/* we flush the output stream to make it appear as soon as possible */
fflush(data->set.err);
- }
+ } /* !(data->progress.flags & PGRS_HIDE) */
return 0;
}