Changeset 12111


Ignore:
Timestamp:
Mar 7, 2011, 2:33:45 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) copyediting.

  1. make some accidentally-public functions/variables private
  2. comment out tr_generateAllowedSet() since we're not using it
  3. argument list indentation
Location:
trunk/libtransmission
Files:
4 edited

Legend:

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

    r12110 r12111  
    921921}
    922922
    923 const tr_torrent * weightTorrent;
    924 
    925 const uint16_t * weightReplication;
     923static const tr_torrent * weightTorrent;
     924
     925static const uint16_t * weightReplication;
    926926
    927927static void
     
    16171617}
    16181618
     1619static void tr_peerMgrSetBlame( tr_torrent *, tr_piece_index_t, int );
     1620
    16191621static void
    16201622peerCallbackFunc( tr_peer * peer, const tr_peer_event * e, void * vt )
     
    21972199**/
    21982200
    2199 void
     2201static void
    22002202tr_peerMgrSetBlame( tr_torrent     * tor,
    22012203                    tr_piece_index_t pieceIndex,
     
    29302932
    29312933static int
    2932 compareChoke( const void * va,
    2933               const void * vb )
     2934compareChoke( const void * va, const void * vb )
    29342935{
    29352936    const struct ChokeData * a = va;
  • trunk/libtransmission/peer-mgr.h

    r12096 r12111  
    205205void tr_peerMgrMarkAllAsSeeds( tr_torrent * tor );
    206206
    207 void tr_peerMgrSetBlame( tr_torrent        * tor,
    208                          tr_piece_index_t    pieceIndex,
    209                          int                 success );
    210 
    211207enum
    212208{
  • trunk/libtransmission/peer-msgs-test.c

    r7783 r12111  
    3232main( void )
    3333{
     34#if 0
    3435    uint32_t           i;
    3536    int                test = 0;
     
    5758    for( i=0; i<numgot; ++i )
    5859        check( buf[i] == pieces[i] );
     60#endif
    5961
    6062    return 0;
  • trunk/libtransmission/peer-msgs.c

    r12096 r12111  
    283283
    284284static void
    285 pokeBatchPeriod( tr_peermsgs * msgs,
    286                  int           interval )
     285pokeBatchPeriod( tr_peermsgs * msgs, int interval )
    287286{
    288287    if( msgs->outMessagesBatchPeriod > interval )
     
    504503
    505504static void
    506 fireClientGotData( tr_peermsgs * msgs,
    507                    uint32_t      length,
    508                    int           wasPieceData )
     505fireClientGotData( tr_peermsgs * msgs, uint32_t length, int wasPieceData )
    509506{
    510507    tr_peer_event e = TR_PEER_EVENT_INIT;
     
    562559
    563560static void
    564 firePeerGotData( tr_peermsgs  * msgs,
    565                  uint32_t       length,
    566                  int            wasPieceData )
     561firePeerGotData( tr_peermsgs * msgs, uint32_t length, tr_bool wasPieceData )
    567562{
    568563    tr_peer_event e = TR_PEER_EVENT_INIT;
     
    580575**/
    581576
     577#if 0
    582578size_t
    583579tr_generateAllowedSet( tr_piece_index_t * setmePieces,
     
    637633updateFastSet( tr_peermsgs * msgs UNUSED )
    638634{
    639 #if 0
    640635    const tr_bool fext = tr_peerIoSupportsFEXT( msgs->peer->io );
    641636    const int peerIsNeedy = msgs->peer->progress < 0.10;
     
    656651            protocolSendAllowedFast( msgs, msgs->fastset[i] );
    657652    }
     653}
    658654#endif
    659 }
    660655
    661656/**
     
    735730
    736731void
    737 tr_peerMsgsSetChoke( tr_peermsgs * msgs,
    738                      int           choke )
     732tr_peerMsgsSetChoke( tr_peermsgs * msgs, int choke )
    739733{
    740734    const time_t now = tr_time( );
     
    764758
    765759void
    766 tr_peerMsgsHave( tr_peermsgs * msgs,
    767                  uint32_t      index )
     760tr_peerMsgsHave( tr_peermsgs * msgs, uint32_t index )
    768761{
    769762    protocolSendHave( msgs, index );
     
    868861
    869862static void
    870 parseLtepHandshake( tr_peermsgs *     msgs,
    871                     int               len,
    872                     struct evbuffer * inbuf )
     863parseLtepHandshake( tr_peermsgs * msgs, int len, struct evbuffer * inbuf )
    873864{
    874865    int64_t   i;
     
    11491140
    11501141static int
    1151 readBtLength( tr_peermsgs *     msgs,
    1152               struct evbuffer * inbuf,
    1153               size_t            inlen )
     1142readBtLength( tr_peermsgs * msgs, struct evbuffer * inbuf, size_t inlen )
    11541143{
    11551144    uint32_t len;
     
    11711160}
    11721161
    1173 static int readBtMessage( tr_peermsgs     * msgs,
    1174                           struct evbuffer * inbuf,
    1175                           size_t            inlen );
     1162static int readBtMessage( tr_peermsgs *, struct evbuffer *, size_t );
    11761163
    11771164static int
    1178 readBtId( tr_peermsgs * msgs, struct evbuffer  * inbuf, size_t inlen )
     1165readBtId( tr_peermsgs * msgs, struct evbuffer * inbuf, size_t inlen )
    11791166{
    11801167    uint8_t id;
     
    12051192    tr_peerUpdateProgress( msgs->torrent, msgs->peer );
    12061193
    1207     updateFastSet( msgs );
     1194    /*updateFastSet( msgs );*/
    12081195    updateInterest( msgs );
    12091196}
     
    12301217
    12311218static void
    1232 peerMadeRequest( tr_peermsgs *               msgs,
    1233                  const struct peer_request * req )
     1219peerMadeRequest( tr_peermsgs * msgs, const struct peer_request * req )
    12341220{
    12351221    const tr_bool fext = tr_peerIoSupportsFEXT( msgs->peer->io );
     
    15941580/* returns 0 on success, or an errno on failure */
    15951581static int
    1596 clientGotBlock( tr_peermsgs *              msgs,
    1597                 struct evbuffer *          data,
    1598                 const struct peer_request * req )
     1582clientGotBlock( tr_peermsgs                * msgs,
     1583                struct evbuffer            * data,
     1584                const struct peer_request  * req )
    15991585{
    16001586    int err;
     
    20212007
    20222008static void
    2023 gotError( tr_peerIo  * io UNUSED,
    2024           short        what,
    2025           void       * vmsgs )
     2009gotError( tr_peerIo * io UNUSED, short what, void * vmsgs )
    20262010{
    20272011    if( what & BEV_EVENT_TIMEOUT )
     
    20892073
    20902074static void
    2091 pexAddedCb( void * vpex,
    2092             void * userData )
     2075pexAddedCb( void * vpex, void * userData )
    20932076{
    20942077    PexDiffs * diffs = userData;
     
    21032086
    21042087static inline void
    2105 pexDroppedCb( void * vpex,
    2106               void * userData )
     2088pexDroppedCb( void * vpex, void * userData )
    21072089{
    21082090    PexDiffs * diffs = userData;
     
    21162098
    21172099static inline void
    2118 pexElementCb( void * vpex,
    2119               void * userData )
     2100pexElementCb( void * vpex, void * userData )
    21202101{
    21212102    PexDiffs * diffs = userData;
Note: See TracChangeset for help on using the changeset viewer.