Commit 34ef3901 authored by Julien Chaffraix's avatar Julien Chaffraix
Browse files

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
parent 252d70a1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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 */
}

+0 −5
Original line number Diff line number Diff line
@@ -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;
}