diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-04-18 07:25:11 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-04-18 07:25:11 +0000 |
commit | 3fd65fb7d83a8e3e6acd1a40c48b46088ebd536f (patch) | |
tree | 13701e723f62ff38452b3c6096eaa98444d9d190 /lib/progress.c | |
parent | ebcafe73b313e70b19e4f7b806e020e59f84c5b1 (diff) |
Remade resume stuff to keep data in the connectdata struct instead of the
main handle struct to work with persistant connections
Diffstat (limited to 'lib/progress.c')
-rw-r--r-- | lib/progress.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/progress.c b/lib/progress.c index 6451da6f4..9fbd45c34 100644 --- a/lib/progress.c +++ b/lib/progress.c @@ -91,11 +91,12 @@ static char *max5data(double bytes, char *max5) */ -void Curl_pgrsDone(struct UrlData *data) +void Curl_pgrsDone(struct connectdata *conn) { + struct UrlData *data = conn->data; if(!(data->progress.flags & PGRS_HIDE)) { data->progress.lastshow=0; - Curl_pgrsUpdate(data); /* the final (forced) update */ + Curl_pgrsUpdate(conn); /* the final (forced) update */ fprintf(data->err, "\n"); } } @@ -172,7 +173,7 @@ void Curl_pgrsSetUploadSize(struct UrlData *data, double size) */ -int Curl_pgrsUpdate(struct UrlData *data) +int Curl_pgrsUpdate(struct connectdata *conn) { struct timeval now; int result; @@ -185,6 +186,8 @@ int Curl_pgrsUpdate(struct UrlData *data) double total_transfer; double total_expected_transfer; + struct UrlData *data = conn->data; + int nowindex = data->progress.speeder_c% CURR_TIME; int checkindex; int count; @@ -198,15 +201,16 @@ int Curl_pgrsUpdate(struct UrlData *data) double total_estimate; + if(data->progress.flags & PGRS_HIDE) ; /* We do enter this function even if we don't wanna see anything, since this is were lots of the calculations are being made that will be used even when not displayed! */ else if(!(data->progress.flags & PGRS_HEADERS_OUT)) { if (!data->progress.callback) { - if(data->resume_from) + if(conn->resume_from) fprintf(data->err, "** Resuming transfer from byte position %d\n", - data->resume_from); + conn->resume_from); fprintf(data->err, " %% Total %% Received %% Xferd Average Speed Time Curr.\n" " Dload Upload Total Current Left Speed\n"); |