Ignore:
Timestamp:
Jan 24, 2009, 3:17:59 AM (13 years ago)
Author:
charles
Message:

(trunk libT) don't limit peer bandwidth during the handshake phase. this solves a bug that made it difficult to connect to peers when the upload bandwidth is saturated.

File:
1 edited

Legend:

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

    r7770 r7789  
    824824    }
    825825
    826     dbgmsg( io, "flushing peer-io, direction %d, limit %zu, bytesUsed %d", (int)dir, limit, bytesUsed );
     826    dbgmsg( io, "flushing peer-io, hasFinishedConnecting %d, direction %d, limit %zu, bytesUsed %d", (int)io->hasFinishedConnecting, (int)dir, limit, bytesUsed );
    827827    return bytesUsed;
    828828}
     
    835835event_enable( tr_peerIo * io, short event )
    836836{
    837     if( event & EV_READ )
     837    if( event & EV_READ ) {
     838        dbgmsg( io, "enabling libevent ready-to-read polling" );
    838839        event_add( &io->event_read, NULL );
    839 
    840     if( event & EV_WRITE )
     840    }
     841
     842    if( event & EV_WRITE ) {
     843        dbgmsg( io, "enabling libevent ready-to-write polling" );
    841844        event_add( &io->event_write, NULL );
     845    }
    842846}
    843847
     
    845849event_disable( struct tr_peerIo * io, short event )
    846850{
    847     if( event & EV_READ )
     851    if( event & EV_READ ) {
     852        dbgmsg( io, "disabling libevent ready-to-read polling" );
    848853        event_del( &io->event_read );
    849 
    850     if( event & EV_WRITE )
     854    }
     855
     856    if( event & EV_WRITE ) {
     857        dbgmsg( io, "disabling libevent ready-to-write polling" );
    851858        event_del( &io->event_write );
     859    }
    852860}
    853861
Note: See TracChangeset for help on using the changeset viewer.