Changeset 3346


Ignore:
Timestamp:
Oct 10, 2007, 2:59:30 AM (15 years ago)
Author:
charles
Message:
  • fix bug that incorrectly marked some incoming connections for termination
  • strip unnecessary linefeeds out of some debug messages
Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/handshake.c

    r3295 r3346  
    278278    uint8_t hash[SHA_DIGEST_LENGTH];
    279279
    280     dbgmsg( handshake, "payload: need %d, got %d\n", (int)HANDSHAKE_SIZE, (int)EVBUFFER_LENGTH(inbuf) );
     280    dbgmsg( handshake, "payload: need %d, got %d", (int)HANDSHAKE_SIZE, (int)EVBUFFER_LENGTH(inbuf) );
    281281
    282282    if( EVBUFFER_LENGTH(inbuf) < HANDSHAKE_SIZE )
     
    878878    uint32_t crypto_select;
    879879
    880 dbgmsg( handshake, "zbz reading IA... have %d, need %d", (int)EVBUFFER_LENGTH(inbuf), (int)needlen );
     880dbgmsg( handshake, "reading IA... have %d, need %d", (int)EVBUFFER_LENGTH(inbuf), (int)needlen );
    881881    if( EVBUFFER_LENGTH(inbuf) < needlen )
    882882        return READ_MORE;
    883883
    884 dbgmsg( handshake, "zbz reading IA..." );
     884dbgmsg( handshake, "reading IA..." );
    885885    /* parse the handshake ... */
    886886    i = parseHandshake( handshake, inbuf );
     
    908908    /* send crypto_select */
    909909    {
    910 dbgmsg( handshake, "handshake->crypto_provide is %d\n", (int)handshake->crypto_provide );
     910dbgmsg( handshake, "handshake->crypto_provide is %d", (int)handshake->crypto_provide );
    911911        if( handshake->crypto_provide & CRYPTO_PROVIDE_CRYPTO )
    912912            crypto_select = CRYPTO_PROVIDE_CRYPTO;
  • trunk/libtransmission/peer-mgr.c

    r3337 r3346  
    937937            peer->io = io;
    938938            peer->msgs = tr_peerMsgsNew( t->tor, peer, msgsCallbackFunc, t, &peer->msgsTag );
     939            atom->time = time( NULL );
    939940        }
    940941    }
     
    15171518        else if( peerIsSeed && clientIsSeed )
    15181519            isWeak = t->tor->pexDisabled || (now-atom->time>=30);
    1519         else if( ( now - atom->time ) < LAISSEZ_FAIRE_PERIOD_SECS )
     1520        else if( !atom->time || ( ( now - atom->time ) < LAISSEZ_FAIRE_PERIOD_SECS ) )
    15201521            isWeak = FALSE;
    15211522        else
Note: See TracChangeset for help on using the changeset viewer.