Ignore:
Timestamp:
Jan 5, 2009, 6:20:47 PM (13 years ago)
Author:
charles
Message:

(trunk libT) fix the new-code errors reported by ZogG and Rolcol and Spaham

File:
1 edited

Legend:

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

    r7618 r7622  
    192192    const tr_direction dir = TR_DOWN;
    193193    const size_t max = 256 * 1024;
    194     const size_t curlen = EVBUFFER_LENGTH( io->inbuf );
    195 
     194    size_t curlen;
     195
     196    assert( tr_isPeerIo( io ) );
     197
     198    curlen = EVBUFFER_LENGTH( io->inbuf );
    196199    howmuch = curlen >= max ? 0 : max - curlen;
    197200    howmuch = tr_bandwidthClamp( &io->bandwidth, TR_DOWN, howmuch );
    198 
    199     assert( tr_isPeerIo( io ) );
    200201
    201202    dbgmsg( io, "libevent says this peer is ready to read" );
     
    497498}
    498499
     500void
     501tr_peerIoClear( tr_peerIo * io )
     502{
     503    tr_peerIoSetIOFuncs( io, NULL, NULL, NULL, NULL );
     504    tr_peerIoSetEnabled( io, TR_UP, FALSE );
     505    tr_peerIoSetEnabled( io, TR_DOWN, FALSE );
     506}
     507
    499508int
    500509tr_peerIoReconnect( tr_peerIo * io )
Note: See TracChangeset for help on using the changeset viewer.