Author: andre Date: Sun Dec 9 22:54:03 2012 New Revision: 244058 URL: http://svnweb.freebsd.org/changeset/base/244058
Log: 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 <f...@smeets.im> Submitted by: Mateusz Guzik <mjgu...@gmail.com> Tested by: Florian Smeets <f...@smeets.im> MFC after: 1 week Modified: head/usr.bin/fetch/fetch.c Modified: head/usr.bin/fetch/fetch.c ============================================================================== --- head/usr.bin/fetch/fetch.c Sun Dec 9 22:53:53 2012 (r244057) +++ head/usr.bin/fetch/fetch.c Sun Dec 9 22:54:03 2012 (r244058) @@ -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); _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"