Ignore:
Timestamp:
Jun 21, 2009, 8:57:26 AM (12 years ago)
Author:
charles
Message:

(trunk) #2222: Make DHT support a compile-time option, enabled by default

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.h

    r8709 r8727  
    289289static TR_INLINE tr_bool tr_torrentAllowsPex( const tr_torrent * tor )
    290290{
    291     return ( tor != NULL  ) && tor->session->isPexEnabled && !tr_torrentIsPrivate( tor );
     291    return ( tor != NULL )
     292        && ( tor->session->isPexEnabled )
     293        && ( !tr_torrentIsPrivate( tor ) );
    292294}
    293295
    294296static TR_INLINE tr_bool tr_torrentAllowsDHT( const tr_torrent * tor )
    295297{
    296     return ( tor != NULL  ) && tor->session->isDHTEnabled && !tr_torrentIsPrivate( tor );
    297 }
    298 
    299 static TR_INLINE tr_bool tr_torrentIsPieceChecked( const tr_torrent  * tor, tr_piece_index_t i )
     298    return ( tor != NULL )
     299        && ( tr_sessionAllowsDHT( tor->session ) )
     300        && ( !tr_torrentIsPrivate( tor ) );
     301}
     302
     303static TR_INLINE tr_bool tr_torrentIsPieceChecked( const tr_torrent  * tor,
     304                                                   tr_piece_index_t    i )
    300305{
    301306    return tr_bitfieldHasFast( &tor->checkedPieces, i );
Note: See TracChangeset for help on using the changeset viewer.