fix the display of upload/download speed, applied in upstream cvs already
from maint, tested by me
This commit is contained in:
parent
60f104e08e
commit
b4b969dc11
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.2 2007/09/15 22:36:54 merdely Exp $
|
||||
# $OpenBSD: Makefile,v 1.3 2007/11/08 21:13:10 todd Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -6,6 +6,7 @@ COMMENT= BitTorrent client for KDE
|
||||
|
||||
VERSION= 2.1.4
|
||||
DISTNAME= ktorrent-${VERSION}
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
CATEGORIES= net x11 x11/kde
|
||||
MASTER_SITES= ${HOMEPAGE}downloads/${VERSION}/
|
||||
|
||||
|
12
net/ktorrent/patches/patch-libktorrent_net_speed_cpp
Normal file
12
net/ktorrent/patches/patch-libktorrent_net_speed_cpp
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-libktorrent_net_speed_cpp,v 1.1 2007/11/08 21:13:10 todd Exp $
|
||||
--- libktorrent/net/speed.cpp.orig Mon Nov 5 18:12:45 2007
|
||||
+++ libktorrent/net/speed.cpp Mon Nov 5 18:13:31 2007
|
||||
@@ -47,7 +47,7 @@ namespace net
|
||||
while (i != dlrate.end())
|
||||
{
|
||||
QPair<Uint32,TimeStamp> & p = *i;
|
||||
- if (now - p.second > SPEED_INTERVAL)
|
||||
+ if (now - p.second > SPEED_INTERVAL || now < p.second)
|
||||
{
|
||||
if (bytes >= p.first) // make sure we don't wrap around
|
||||
bytes -= p.first; // subtract bytes
|
Loading…
Reference in New Issue
Block a user