Changeset 3179


Ignore:
Timestamp:
Sep 26, 2007, 2:29:49 AM (15 years ago)
Author:
charles
Message:

fix a handshake bug and reduce the idle cpu load a little.

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/handshake.c

    r3172 r3179  
    750750    int len;
    751751
     752dbgmsg( handshake, "in readYa... need %d, have %d", (int)KEY_LEN, (int)EVBUFFER_LENGTH( inbuf ) );
    752753    if( EVBUFFER_LENGTH( inbuf ) < KEY_LEN )
    753754        return READ_MORE;
     
    759760    tr_sha1( handshake->myReq1, "req1", 4, secret, KEY_LEN, NULL );
    760761
     762dbgmsg( handshake, "sending out our pad a" );
    761763    /* send our public key to the peer */
    762764    walk = outbuf;
     
    769771    setReadState( handshake, AWAITING_PAD_A );
    770772    tr_peerIoWrite( handshake->io, outbuf, walk-outbuf );
    771 
    772     return READ_DONE;
     773    return READ_AGAIN;
    773774}
    774775
  • trunk/libtransmission/trevent.c

    r3117 r3179  
    230230    eh->lock = tr_lockNew( );
    231231    eh->h = handle;
    232     eh->pulseInterval = timevalMsec( 20 );
     232    eh->pulseInterval = timevalMsec( 50 );
    233233    eh->thread = tr_threadNew( libeventThreadFunc, eh, "libeventThreadFunc" );
    234234}
Note: See TracChangeset for help on using the changeset viewer.