Changeset 7942


Ignore:
Timestamp:
Feb 25, 2009, 1:04:51 PM (13 years ago)
Author:
charles
Message:

(trunk libT) #1829: high CPU use in refillPiece()

File:
1 edited

Legend:

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

    r7913 r7942  
    707707
    708708static void
     709blockIteratorSkipCurrentPiece( struct tr_blockIterator * i )
     710{
     711    i->blockIndex = i->blockCount;
     712}
     713
     714static void
    709715blockIteratorFree( struct tr_blockIterator ** inout )
    710716{
     
    813819    {
    814820        int j;
    815         int handled = FALSE;
     821        tr_bool handled = FALSE;
    816822
    817823        const tr_piece_index_t index = tr_torBlockPiece( tor, block );
     
    868874            }
    869875        }
     876
     877        if( !handled )
     878            blockIteratorSkipCurrentPiece( t->refillQueue );
    870879    }
    871880
Note: See TracChangeset for help on using the changeset viewer.