Changeset 13527


Ignore:
Timestamp:
Sep 25, 2012, 2:07:03 AM (10 years ago)
Author:
jordan
Message:

(trunk, libT) #5049: fix bug that caused some incoming encrypted peer connections to fail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/handshake.c

    r12365 r13527  
    869869          struct evbuffer * inbuf )
    870870{
     871    char       * padc;
    871872    uint16_t     ia_len;
    872873    const size_t needlen = handshake->pad_c_len + sizeof( uint16_t );
     
    875876        return READ_LATER;
    876877
    877     evbuffer_drain( inbuf, handshake->pad_c_len );
    878 
     878    /* read the throwaway padc */
     879    padc = tr_new (char, handshake->pad_c_len);
     880    tr_peerIoReadBytes (handshake->io, inbuf, padc, handshake->pad_c_len);
     881    tr_free (padc);
     882
     883    /* read ia_len */
    879884    tr_peerIoReadUint16( handshake->io, inbuf, &ia_len );
    880885    dbgmsg( handshake, "ia_len is %d", (int)ia_len );
Note: See TracChangeset for help on using the changeset viewer.