Fix a potentially bug that can get tracker users' statistics skewed. Bump the

PORTREVISION.

Obtained from: Transmission SVN
This commit is contained in:
Jeremy Messenger 2007-04-30 04:21:44 +00:00
parent 1662f12366
commit d6e14e8f1f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=191180
5 changed files with 73 additions and 3 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= transmission
PORTVERSION= 0.71
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES= net-p2p
MASTER_SITES= http://download.m0k.org/${PORTNAME}/files/
DISTNAME= Transmission-${PORTVERSION}

View File

@ -0,0 +1,35 @@
Index: /trunk/libtransmission/tracker.c
===================================================================
--- libtransmission/tracker.c (revision 1685)
+++ libtransmission/tracker.c (revision 1810)
@@ -516,16 +516,15 @@
char * event, * trackerid, * idparam;
uint64_t left;
- uint64_t down;
- uint64_t up;
char start;
int numwant = 50;
- down = tor->downloadedCur;
- up = tor->uploadedCur;
if( tc->started )
{
event = "&event=started";
- down = 0;
- up = 0;
+
+ tor->downloadedPrev += tor->downloadedCur;
+ tor->downloadedCur = 0;
+ tor->uploadedPrev += tor->uploadedCur;
+ tor->uploadedCur = 0;
if( shouldChangePort( tc ) )
@@ -576,6 +575,6 @@
"%s",
tcInf->announce, start, tor->escapedHashString,
- tc->id, tc->publicPort, up, down, left, numwant,
- tor->key, idparam, trackerid, event );
+ tc->id, tc->publicPort, tor->uploadedCur, tor->downloadedCur,
+ left, numwant, tor->key, idparam, trackerid, event );
}

View File

@ -5,7 +5,7 @@
# $FreeBSD$
#
PORTREVISION= 0
PORTREVISION= 1
PKGNAMESUFFIX= -gtk2
COMMENT= A free BitTorrent client written from scratch in C with GTK+2

View File

@ -7,7 +7,7 @@
PORTNAME= transmission
PORTVERSION= 0.71
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES= net-p2p
MASTER_SITES= http://download.m0k.org/${PORTNAME}/files/
DISTNAME= Transmission-${PORTVERSION}

View File

@ -0,0 +1,35 @@
Index: /trunk/libtransmission/tracker.c
===================================================================
--- libtransmission/tracker.c (revision 1685)
+++ libtransmission/tracker.c (revision 1810)
@@ -516,16 +516,15 @@
char * event, * trackerid, * idparam;
uint64_t left;
- uint64_t down;
- uint64_t up;
char start;
int numwant = 50;
- down = tor->downloadedCur;
- up = tor->uploadedCur;
if( tc->started )
{
event = "&event=started";
- down = 0;
- up = 0;
+
+ tor->downloadedPrev += tor->downloadedCur;
+ tor->downloadedCur = 0;
+ tor->uploadedPrev += tor->uploadedCur;
+ tor->uploadedCur = 0;
if( shouldChangePort( tc ) )
@@ -576,6 +575,6 @@
"%s",
tcInf->announce, start, tor->escapedHashString,
- tc->id, tc->publicPort, up, down, left, numwant,
- tor->key, idparam, trackerid, event );
+ tc->id, tc->publicPort, tor->uploadedCur, tor->downloadedCur,
+ left, numwant, tor->key, idparam, trackerid, event );
}