Bugzilla – Attachment 2333 Details for
Bug 2137
progress meter shows wrong speed during resume
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Don't assume that the starting poistion is zero
progress-meter-resume-fix.diff (text/plain), 1.24 KB, created by
Iain Morgan
on 2013-09-14 05:04:16 AEST
(
hide
)
Description:
Don't assume that the starting poistion is zero
Filename:
MIME Type:
Creator:
Iain Morgan
Created:
2013-09-14 05:04:16 AEST
Size:
1.24 KB
patch
obsolete
>Index: progressmeter.c >=================================================================== >RCS file: /cvs/openssh/progressmeter.c,v >retrieving revision 1.40 >diff -u -r1.40 progressmeter.c >--- progressmeter.c 2 Jun 2013 13:46:24 -0000 1.40 >+++ progressmeter.c 13 Sep 2013 17:52:56 -0000 >@@ -66,6 +66,7 @@ > static time_t start; /* start progress */ > static time_t last_update; /* last progress update */ > static char *file; /* name of the file being transferred */ >+static off_t start_pos; /* initial position of transfer */ > static off_t end_pos; /* ending position of transfer */ > static off_t cur_pos; /* transfer position as of last refresh */ > static volatile off_t *counter; /* progress counter */ >@@ -129,7 +130,7 @@ > int i, len; > int file_len; > >- transferred = *counter - cur_pos; >+ transferred = *counter - (cur_pos ? cur_pos : start_pos); > cur_pos = *counter; > now = monotime(); > bytes_left = end_pos - cur_pos; >@@ -139,7 +140,7 @@ > else { > elapsed = now - start; > /* Calculate true total speed when done */ >- transferred = end_pos; >+ transferred = end_pos - start_pos; > bytes_per_second = 0; > } > >@@ -251,6 +252,7 @@ > { > start = last_update = monotime(); > file = f; >+ start_pos = *ctr; > end_pos = filesize; > cur_pos = 0; > counter = ctr;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2137
:
2324
| 2333