Ignore:
Timestamp:
Feb 21, 2011, 3:36:07 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) remove unused functions: tr_bitsetDifference() tr_bitfieldDifference()

File:
1 edited

Legend:

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

    r12003 r12006  
    31063106    /* if we're seeding and the peer has everything we have,
    31073107     * and enough time has passed for a pex exchange, then disconnect */
    3108     if( tr_torrentIsSeed( tor ) )
    3109     {
    3110         tr_bool peerHasEverything;
    3111 
    3112         if( atom->seedProbability != -1 )
    3113         {
    3114             peerHasEverything = atomIsSeed( atom );
    3115         }
    3116         else
    3117         {
    3118             tr_bitfield * tmp = tr_bitfieldDup( tr_cpPieceBitfield( &tor->completion ) );
    3119             tr_bitsetDifference( tmp, &peer->have );
    3120             peerHasEverything = tr_bitfieldCountTrueBits( tmp ) == 0;
    3121             tr_bitfieldFree( tmp );
    3122         }
    3123 
    3124         if( peerHasEverything && ( !tr_torrentAllowsPex(tor) || (now-atom->time>=30 )))
    3125         {
    3126             tordbg( t, "purging peer %s because we're both seeds",
    3127                     tr_atomAddrStr( atom ) );
    3128             return TRUE;
    3129         }
    3130     }
     3108    if( tr_torrentIsSeed( tor ) && ( peer->progress >= 1.0f ) )
     3109        return !tr_torrentAllowsPex(tor) || (now-atom->time>=30);
    31313110
    31323111    /* disconnect if it's been too long since piece data has been transferred.
Note: See TracChangeset for help on using the changeset viewer.