Changeset 7065


Ignore:
Timestamp:
Nov 7, 2008, 5:37:59 AM (12 years ago)
Author:
charles
Message:

(libT) revise r7065

Location:
trunk/libtransmission
Files:
4 edited

Legend:

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

    r7064 r7065  
    18921892    tr_peer **         peers = getConnectedPeers( t, &peerCount );
    18931893    struct ChokeData * choke = tr_new0( struct ChokeData, peerCount );
    1894     const int          chokeAll = !tr_torrentPieceTransferIsAllowed( t->tor, TR_CLIENT_TO_PEER );
     1894    const int          chokeAll = !tr_torrentIsPieceTransferAllowed( t->tor, TR_CLIENT_TO_PEER );
    18951895
    18961896    assert( torrentIsLocked( t ) );
     
    25202520        /* if piece data is disallowed, don't bother limiting bandwidth --
    25212521         * we won't be asking for, or sending out, any pieces */
    2522         if( !tr_torrentPieceTransferIsAllowed( t->tor, direction ) )
     2522        if( !tr_torrentIsPieceTransferAllowed( t->tor, direction ) )
    25232523            speedMode = TR_SPEEDLIMIT_UNLIMITED;
    25242524        else
  • trunk/libtransmission/peer-msgs.c

    r7064 r7065  
    543543        return FALSE;
    544544
    545     if( !tr_torrentPieceTransferIsAllowed( msgs->torrent, TR_PEER_TO_CLIENT ) )
     545    if( !tr_torrentIsPieceTransferAllowed( msgs->torrent, TR_PEER_TO_CLIENT ) )
    546546        return FALSE;
    547547
     
    814814    if( msgs->info->clientIsChoked )
    815815        return;
    816     if( !tr_torrentPieceTransferIsAllowed( msgs->torrent, TR_PEER_TO_CLIENT ) )
     816    if( !tr_torrentIsPieceTransferAllowed( msgs->torrent, TR_PEER_TO_CLIENT ) )
    817817        return;
    818818
  • trunk/libtransmission/torrent.c

    r7064 r7065  
    196196
    197197int
    198 tr_torrentPieceTransferIsAllowed( const tr_torrent  * tor,
     198tr_torrentIsPieceTransferAllowed( const tr_torrent  * tor,
    199199                                  tr_direction        direction )
    200200{
     
    204204    {
    205205        case TR_SPEEDLIMIT_GLOBAL:
    206             isEnabled = tr_sessionGetSpeedLimit( tor->session, direction ) > 0;
     206            isEnabled = !tr_sessionIsSpeedLimitEnabled( tor->session, direction )
     207                      || tr_sessionGetSpeedLimit( tor->session, direction ) > 0;
    207208            break;
    208209
  • trunk/libtransmission/torrent.h

    r7064 r7065  
    8282int         tr_torrentAllowsPex( const tr_torrent * );
    8383
    84 int         tr_torrentPieceTransferIsAllowed( const tr_torrent * torrent,
     84int         tr_torrentIsPieceTransferAllowed( const tr_torrent * torrent,
    8585                                              tr_direction       direction );
    8686
Note: See TracChangeset for help on using the changeset viewer.