aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/progress.c9
-rw-r--r--lib/progress.h4
-rw-r--r--lib/transfer.c2
3 files changed, 9 insertions, 6 deletions
diff --git a/lib/progress.c b/lib/progress.c
index 1eeb78052..4c9a63acb 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -146,13 +146,16 @@ void Curl_pgrsDone(struct connectdata *conn)
data->progress.speeder_c = 0; /* reset the progress meter display */
}
-/* reset all times except redirect */
-void Curl_pgrsResetTimes(struct SessionHandle *data)
+/* reset all times except redirect, and reset the known transfer sizes */
+void Curl_pgrsResetTimesSizes(struct SessionHandle *data)
{
data->progress.t_nslookup = 0.0;
data->progress.t_connect = 0.0;
data->progress.t_pretransfer = 0.0;
data->progress.t_starttransfer = 0.0;
+
+ Curl_pgrsSetDownloadSize(data, 0);
+ Curl_pgrsSetUploadSize(data, 0);
}
void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
diff --git a/lib/progress.h b/lib/progress.h
index f5cc5403a..a41d5f92f 100644
--- a/lib/progress.h
+++ b/lib/progress.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -46,7 +46,7 @@ void Curl_pgrsSetUploadSize(struct SessionHandle *data, curl_off_t size);
void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, curl_off_t size);
void Curl_pgrsSetUploadCounter(struct SessionHandle *data, curl_off_t size);
int Curl_pgrsUpdate(struct connectdata *);
-void Curl_pgrsResetTimes(struct SessionHandle *data);
+void Curl_pgrsResetTimesSizes(struct SessionHandle *data);
void Curl_pgrsTime(struct SessionHandle *data, timerid timer);
diff --git a/lib/transfer.c b/lib/transfer.c
index d6061be58..d872719fa 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1924,7 +1924,7 @@ CURLcode Curl_follow(struct SessionHandle *data,
break;
}
Curl_pgrsTime(data, TIMER_REDIRECT);
- Curl_pgrsResetTimes(data);
+ Curl_pgrsResetTimesSizes(data);
return CURLE_OK;
#endif /* CURL_DISABLE_HTTP */