mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-02-16 22:06:55 +00:00
- markus@cvs.openbsd.org 2003/12/02 12:15:10
[progressmeter.c] improvments from andreas@: * saner speed estimate for transfers that takes less than a second by rounding the time to 1 second. * when the transfer is finished calculate the actual total speed rather than the current speed which is given during the transfer
This commit is contained in:
parent
37afa9d9a4
commit
1fb0425359
@ -7,6 +7,13 @@
|
|||||||
[cipher-aes.c]
|
[cipher-aes.c]
|
||||||
fix #ifdef before #define; ok markus@
|
fix #ifdef before #define; ok markus@
|
||||||
(RCS ID sync only, Portable already had this)
|
(RCS ID sync only, Portable already had this)
|
||||||
|
- markus@cvs.openbsd.org 2003/12/02 12:15:10
|
||||||
|
[progressmeter.c]
|
||||||
|
improvments from andreas@:
|
||||||
|
* saner speed estimate for transfers that takes less than a second by
|
||||||
|
rounding the time to 1 second.
|
||||||
|
* when the transfer is finished calculate the actual total speed
|
||||||
|
rather than the current speed which is given during the transfer
|
||||||
|
|
||||||
20031208
|
20031208
|
||||||
- (tim) [configure.ac] Bug 770. Fix --without-rpath.
|
- (tim) [configure.ac] Bug 770. Fix --without-rpath.
|
||||||
@ -1545,4 +1552,4 @@
|
|||||||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||||
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.3133 2003/12/09 08:05:42 dtucker Exp $
|
$Id: ChangeLog,v 1.3134 2003/12/09 08:07:13 dtucker Exp $
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: progressmeter.c,v 1.17 2003/11/20 11:39:28 markus Exp $");
|
RCSID("$OpenBSD: progressmeter.c,v 1.18 2003/12/02 12:15:10 markus Exp $");
|
||||||
|
|
||||||
#include "progressmeter.h"
|
#include "progressmeter.h"
|
||||||
#include "atomicio.h"
|
#include "atomicio.h"
|
||||||
@ -120,14 +120,18 @@ refresh_progress_meter(void)
|
|||||||
|
|
||||||
if (bytes_left > 0)
|
if (bytes_left > 0)
|
||||||
elapsed = now - last_update;
|
elapsed = now - last_update;
|
||||||
else
|
else {
|
||||||
elapsed = now - start;
|
elapsed = now - start;
|
||||||
|
/* Calculate true total speed when done */
|
||||||
|
transferred = end_pos;
|
||||||
|
bytes_per_second = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* calculate speed */
|
/* calculate speed */
|
||||||
if (elapsed != 0)
|
if (elapsed != 0)
|
||||||
cur_speed = (transferred / elapsed);
|
cur_speed = (transferred / elapsed);
|
||||||
else
|
else
|
||||||
cur_speed = 0;
|
cur_speed = transferred;
|
||||||
|
|
||||||
#define AGE_FACTOR 0.9
|
#define AGE_FACTOR 0.9
|
||||||
if (bytes_per_second != 0) {
|
if (bytes_per_second != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user