mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-14 06:12:01 +01:00
Fix bandwidth reporting when doing a restarted download with "-r".
The offset is already accounted for in xs->lastrcvd and doesn't have to be subtracted again. Reported by: Florian Smeets <flo@smeets.im> Submitted by: Mateusz Guzik <mjguzik@gmail.com> Tested by: Florian Smeets <flo@smeets.im> MFC after: 1 week
This commit is contained in:
parent
39d4f2c6f0
commit
162361c198
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244058
@ -183,7 +183,7 @@ stat_bps(struct xferstat *xs)
|
||||
if (delta == 0.0) {
|
||||
snprintf(str, sizeof str, "?? Bps");
|
||||
} else {
|
||||
bps = (xs->rcvd - xs->lastrcvd - xs->offset) / delta;
|
||||
bps = (xs->rcvd - xs->lastrcvd) / delta;
|
||||
snprintf(str, sizeof str, "%sps", stat_bytes((off_t)bps));
|
||||
}
|
||||
return (str);
|
||||
|
Loading…
Reference in New Issue
Block a user