Changeset 10017


Ignore:
Timestamp:
Jan 25, 2010, 5:19:54 AM (12 years ago)
Author:
charles
Message:

(trunk libT) #2792 "Since 1.80 update downloads failing" -- a better fix than r10015...

File:
1 edited

Legend:

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

    r10015 r10017  
    716716
    717717static void
     718decrementPendingReqCount( const struct block_request * b )
     719{
     720    if( b->peer != NULL )
     721        if( b->peer->pendingReqsToPeer > 0 )
     722            --b->peer->pendingReqsToPeer;
     723}
     724
     725static void
    718726requestListRemove( Torrent * t, tr_block_index_t block, const tr_peer * peer )
    719727{
     
    724732        assert( pos < t->requestCount );
    725733
    726         if( b->peer != NULL )
    727         {
    728             --b->peer->pendingReqsToPeer;
    729             assert( b->peer->pendingReqsToPeer >= 0 );
    730         }
     734        decrementPendingReqCount( b );
    731735
    732736        memmove( t->requests + pos,
     
    11441148                if( ( it->peer != NULL ) && ( it->peer->msgs != NULL ) ) {
    11451149                    tr_peerMsgsCancel( it->peer->msgs, it->block );
    1146                     if( t->requestCount > 0 )
    1147                         --t->requestCount;
     1150                    decrementPendingReqCount( it );
    11481151                }
    11491152            }
Note: See TracChangeset for help on using the changeset viewer.