Changeset 14544


Ignore:
Timestamp:
Jun 24, 2015, 8:38:41 PM (6 years ago)
Author:
mikedld
Message:

#5964: Follow-up fix for #5456 (encrypted communication with libevent 2.1.x)

I've misread libevent documentation and the check introduced was not
entirely correct. Changed evbuffer_peek call now to only request the
data which would fit into provided iovec.

File:
1 edited

Legend:

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

    r14542 r14544  
    11491149        evbuffer_ptr_set (outbuf, &pos, old_length, EVBUFFER_PTR_SET);
    11501150        do {
    1151             if (evbuffer_peek (outbuf, byteCount, &pos, &iovec, 1) != 1)
     1151            if (evbuffer_peek (outbuf, -1, &pos, &iovec, 1) != 1)
    11521152              break;
    11531153            tr_cryptoDecrypt (&io->crypto, iovec.iov_len, iovec.iov_base, iovec.iov_base);
Note: See TracChangeset for help on using the changeset viewer.