Changeset 11899


Ignore:
Timestamp:
Feb 17, 2011, 12:57:36 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) #3767 "rarest first policy" -- possible fix for assertion error reported by rolcol

Resolve the problem described @ https://trac.transmissionbt.com/ticket/3767#comment:38

File:
1 edited

Legend:

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

    r11897 r11899  
    12071207    assert( tr_bitfieldTestFast( b, n-1 ) );
    12081208
    1209     if( tr_bitfieldTestFast( b, n-1 ) )
    1210         for( i=0; i<n; ++i )
    1211             if( tr_bitfieldHasFast( b, i ) )
    1212                 ++rep[i];
     1209    for( i=0; i<n; ++i )
     1210        if( tr_bitfieldHas( b, i ) )
     1211            ++rep[i];
    12131212
    12141213    if( t->pieceSortState == PIECES_SORTED_BY_WEIGHT )
     
    12531252        const tr_bitfield * const b = &bitset->bitfield;
    12541253
    1255         if( tr_bitfieldTestFast( b, n-1 ) )
    1256             for( i=0; i<n; ++i )
    1257                 if( tr_bitfieldHasFast( b, i ) )
    1258                     --t->pieceReplication[i];
     1254        for( i=0; i<n; ++i )
     1255            if( tr_bitfieldHas( b, i ) )
     1256                --t->pieceReplication[i];
    12591257
    12601258        if( t->pieceSortState == PIECES_SORTED_BY_WEIGHT )
Note: See TracChangeset for help on using the changeset viewer.