1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00

(libT) #1417: revert r7039

This commit is contained in:
Charles Kerr 2008-11-04 21:33:24 +00:00
parent 49fc346491
commit 17b8624ca7
2 changed files with 3 additions and 3 deletions

View file

@ -30,7 +30,6 @@
#include "net.h"
#include "peer-io.h"
#include "ratecontrol.h"
#include "stats.h" /* tr_statsAddUploaded(), tr_statsAddDownloaded() */
#include "trevent.h"
#include "utils.h"
@ -182,7 +181,6 @@ didWriteWrapper( struct bufferevent * e,
b->bytesLeft -= MIN( b->bytesLeft, (size_t)n );
b->bytesUsed += n;
tr_rcTransferred( io->speedometer[TR_UP], n );
tr_statsAddUploaded( io->session, n );
dbgmsg( io,
"wrote %zu bytes to peer... upload bytesLeft is now %zu",
n,
@ -215,7 +213,6 @@ canReadWrapper( struct bufferevent * e,
b->bytesLeft -= MIN( b->bytesLeft, (size_t)n );
b->bytesUsed += n;
tr_rcTransferred( io->speedometer[TR_DOWN], n );
tr_statsAddDownloaded( io->session, n );
dbgmsg( io,
"%zu new input bytes. bytesUsed is %zu, bytesLeft is %zu",
n, b->bytesUsed,

View file

@ -31,6 +31,7 @@
#include "peer-mgr-private.h"
#include "peer-msgs.h"
#include "ptrarray.h"
#include "stats.h" /* tr_statsAddUploaded, tr_statsAddDownloaded */
#include "torrent.h"
#include "trevent.h"
#include "utils.h"
@ -1007,6 +1008,7 @@ peerCallbackFunc( void * vpeer,
tr_torrent * tor = t->tor;
tor->activityDate = now;
tor->uploadedCur += e->length;
tr_statsAddUploaded( tor->session, e->length );
if( peer )
{
struct peer_atom * a = getExistingAtom( t, &peer->in_addr );
@ -1028,6 +1030,7 @@ peerCallbackFunc( void * vpeer,
* into the jurisdiction of the tracker." */
if( peer )
tor->downloadedCur += e->length;
tr_statsAddDownloaded( tor->session, e->length );
if( peer ) {
struct peer_atom * a = getExistingAtom( t, &peer->in_addr );
a->piece_data_time = now;