Fix a potentially bug that can get tracker users' statistics skewed. Bump the
PORTREVISION. Obtained from: Transmission SVN
This commit is contained in:
parent
1662f12366
commit
d6e14e8f1f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=191180
@ -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}
|
||||
|
@ -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 );
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTREVISION= 0
|
||||
PORTREVISION= 1
|
||||
PKGNAMESUFFIX= -gtk2
|
||||
|
||||
COMMENT= A free BitTorrent client written from scratch in C with GTK+2
|
||||
|
@ -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}
|
||||
|
35
net-p2p/transmission/files/patch-libtransmission_tracker.c
Normal file
35
net-p2p/transmission/files/patch-libtransmission_tracker.c
Normal 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 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user