Changeset 1251


Ignore:
Timestamp:
Dec 18, 2006, 4:56:27 AM (15 years ago)
Author:
livings124
Message:

libT now stores peer upload rate

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer.c

    r1248 r1251  
    101101
    102102    tr_ratecontrol_t * download;
     103    tr_ratecontrol_t * upload;
    103104};
    104105
     
    224225    }
    225226    tr_rcClose( peer->download );
     227    tr_rcClose( peer->upload );
    226228    free( peer );
    227229}
     
    451453
    452454            blockSent( peer, ret );
     455            tr_rcTransferred( peer->upload, ret );
    453456            tr_rcTransferred( tor->upload, ret );
    454457            tr_rcTransferred( tor->globalUpload, ret );
     
    572575}
    573576
     577float tr_peerUploadRate( tr_peer_t * peer )
     578{
     579    return tr_rcRate( peer->upload );
     580}
     581
    574582int tr_peerIsUnchoked( tr_peer_t * peer )
    575583{
  • trunk/libtransmission/peer.h

    r1248 r1251  
    4848uint8_t *   tr_peerBitfield      ( tr_peer_t * );
    4949float       tr_peerDownloadRate  ( tr_peer_t * );
     50float       tr_peerUploadRate    ( tr_peer_t * );
    5051int         tr_peerIsUnchoked    ( tr_peer_t * );
    5152int         tr_peerIsInterested  ( tr_peer_t * );
Note: See TracChangeset for help on using the changeset viewer.