curl: second follow-up for commit 5af2bfb9
authorYang Tse <yangsita@gmail.com>
Thu, 1 Aug 2013 10:25:01 +0000 (12:25 +0200)
committerYang Tse <yangsita@gmail.com>
Thu, 1 Aug 2013 10:25:01 +0000 (12:25 +0200)
Display progress-bar unconditionally on first call

src/tool_cb_prg.c

index cc02126482c32eabfc58cd03c753542a6437046f..b049377eaa93eb641b07744b0e29cd400209d8f7 100644 (file)
@@ -55,7 +55,8 @@ int tool_progress_cb(void *clientp,
   curl_off_t total;
   curl_off_t point;
 
-  if(tvdiff(now, bar->prevtime) < 200L) /* allow 5 Hz */
+  if(bar->calls && (tvdiff(now, bar->prevtime) < 200L))
+    /* after first call, limit progress-bar updating to 5 Hz */
     return 0;
 
   /* expected transfer size */