Ignore:
Timestamp:
Jul 29, 2008, 12:52:02 AM (14 years ago)
Author:
charles
Message:

#1123: unreachable peers need to be handled better

File:
1 edited

Legend:

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

    r6334 r6415  
    6969
    7070    tr_crypto           * crypto;
     71
     72    uint64_t              fromPeer;
    7173};
    7274
     
    538540    {
    539541        case PEER_ENCRYPTION_NONE:
    540             evbuffer_remove( inbuf, bytes, byteCount );
     542            io->fromPeer += evbuffer_remove( inbuf, bytes, byteCount );
    541543            break;
    542544
    543545        case PEER_ENCRYPTION_RC4:
    544             evbuffer_remove( inbuf, bytes, byteCount );
     546            io->fromPeer += evbuffer_remove( inbuf, bytes, byteCount );
    545547            tr_cryptoDecrypt( io->crypto, byteCount, bytes, bytes );
    546548            break;
     
    594596    return time( NULL ) - io->timeCreated;
    595597}
     598
     599int64_t
     600tr_peerIoCountBytesFromPeer( const tr_peerIo * io )
     601{
     602    return io->fromPeer;
     603}
     604
Note: See TracChangeset for help on using the changeset viewer.