Ignore:
Timestamp:
Oct 1, 2007, 4:31:17 PM (15 years ago)
Author:
charles
Message:

don't log BT protocol messages in UL/DL speed -- only log piece data transfers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-io.c

    r3247 r3260  
    5353    unsigned int peerIdIsSet : 1;
    5454
    55     tr_ratecontrol   * rateToPeer;
    56     tr_ratecontrol   * rateToClient;
    57 
    5855    tr_can_read_cb     canRead;
    5956    tr_did_write_cb    didWrite;
     
    121118    c->port = port;
    122119    c->socket = socket;
    123     c->rateToPeer = tr_rcInit( );
    124     c->rateToClient = tr_rcInit( );
    125120    c->isIncoming = isIncoming ? 1 : 0;
    126121    c->bufev = bufferevent_new( c->socket,
     
    175170        tr_netClose( c->socket );
    176171
    177         tr_rcClose( c->rateToClient );
    178         tr_rcClose( c->rateToPeer );
    179 
    180172        tr_cryptoFree( c->crypto );
    181173
     
    399391{
    400392    tr_bufferevent_write( io->handle, io->bufev, writeme, writeme_len );
    401     tr_rcTransferred( io->rateToPeer, writeme_len );
    402393}
    403394
     
    503494            /*fprintf( stderr, "reading %d plaintext bytes from inbuf...\n", byteCount );*/
    504495            evbuffer_remove(  inbuf, bytes, byteCount );
    505             tr_rcTransferred( io->rateToClient, byteCount );
    506496            break;
    507497
     
    510500            evbuffer_remove(  inbuf, bytes, byteCount );
    511501            tr_cryptoDecrypt( io->crypto, byteCount, bytes, bytes );
    512             tr_rcTransferred( io->rateToClient, byteCount );
    513502            break;
    514503
     
    555544    tr_free( tmp );
    556545}
    557 
    558 /**
    559 ***
    560 **/
    561 
    562 float
    563 tr_peerIoGetRateToClient( const tr_peerIo * io )
    564 {
    565     return io==NULL ? 0.0f : tr_rcRate( io->rateToClient );
    566 
    567 }
    568 
    569 float
    570 tr_peerIoGetRateToPeer( const tr_peerIo * io )
    571 {
    572     return io==NULL ? 0.0f : tr_rcRate( io->rateToPeer );
    573 }
    574 
Note: See TracChangeset for help on using the changeset viewer.