1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

progress: don't print the last update on a separate line.

Curl_posttransfer is called too soon to add the final new line.
Moved the new line logic to pgrsDone as there is no more call to
update the progress status after this call.

Reported by: Dmitri Shubin <sbn_at_tbricks.com>
http://curl.haxx.se/mail/lib-2010-12/0162.html
This commit is contained in:
Julien Chaffraix 2011-03-20 18:00:29 -07:00
parent 252d70a1ed
commit 34ef39015e
2 changed files with 6 additions and 5 deletions

View File

@ -137,6 +137,12 @@ void Curl_pgrsDone(struct connectdata *conn)
data->progress.lastshow=0;
Curl_pgrsUpdate(conn); /* the final (forced) update */
if(!(data->progress.flags & PGRS_HIDE) &&
!data->progress.callback)
/* only output if we don't use a progress callback and we're not
* hidden */
fprintf(data->set.err, "\n");
data->progress.speeder_c = 0; /* reset the progress meter display */
}

View File

@ -1528,11 +1528,6 @@ CURLcode Curl_posttransfer(struct SessionHandle *data)
(void)data; /* unused parameter */
#endif
if(!(data->progress.flags & PGRS_HIDE) &&
!data->progress.callback)
/* only output if we don't use a progress callback and we're not hidden */
fprintf(data->set.err, "\n");
return CURLE_OK;
}