Bug 2137

Summary: progress meter shows wrong speed during resume
Product: Portable OpenSSH Reporter: Loganaden Velvindron <loganaden>
Component: sftpAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: minor CC: djm, dtucker, imorgan
Priority: P5    
Version: -current   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 2130    
Attachments:
Description Flags
progressmeter diff
none
Don't assume that the starting poistion is zero dtucker: ok+

Description Loganaden Velvindron 2013-08-01 17:03:51 AEST
Created attachment 2324 [details]
progressmeter diff

Iain Morgan reported that the progress meter would display erroneous speeds when interrupting and resuming downloads.

I'm attaching a WIP fix.
Comment 1 Iain Morgan 2013-09-14 05:04:16 AEST
Created attachment 2333 [details]
Don't assume that the starting poistion is zero

This looks like it fixes the issue. Save the initial offset when starting the progress meter and use it when cur_pos is zero. Also, use it when reporting the statistics for the completed transfer. This also fixes the negative speed issue when the transfer is interrupted by a signal.
Comment 2 Damien Miller 2013-09-19 10:25:20 AEST
patch applied; thanks
Comment 3 Damien Miller 2015-08-11 23:02:39 AEST
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1