Changeset 7544


Ignore:
Timestamp:
Dec 30, 2008, 3:45:12 AM (12 years ago)
Author:
charles
Message:

(trunk libT) #1632: bandwidth.c: 428: tr_bandwidthUsed: Assertion `tr_isBandwidth( b )' failed

File:
1 edited

Legend:

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

    r7541 r7544  
    154154    tr_session * session = io->session;
    155155
     156    assert( tr_isPeerIo( io ) );
     157
    156158    dbgmsg( io, "canRead" );
    157159
     
    169171            const size_t used = oldLen - EVBUFFER_LENGTH( io->inbuf );
    170172
    171             if( piece )
    172                 tr_bandwidthUsed( io->bandwidth, TR_DOWN, piece, TRUE );
    173 
    174             if( used != piece )
    175                 tr_bandwidthUsed( io->bandwidth, TR_DOWN, used - piece, FALSE );
     173            assert( tr_isPeerIo( io ) );
     174
     175            if( io->bandwidth != NULL )
     176            {
     177                if( piece )
     178                    tr_bandwidthUsed( io->bandwidth, TR_DOWN, piece, TRUE );
     179
     180                if( used != piece )
     181                    tr_bandwidthUsed( io->bandwidth, TR_DOWN, used - piece, FALSE );
     182            }
    176183
    177184            switch( ret )
Note: See TracChangeset for help on using the changeset viewer.