1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

(libT) #3991 "Connection encryption stopped working" -- fixed.

This is a pretty straightfoward bug: the call to evbuffer_peek() should not have been wrapped in assert().
This commit is contained in:
Jordan Lee 2011-02-08 00:31:50 +00:00
parent 6a9d3b8c3b
commit 394fed632f

View file

@ -772,7 +772,8 @@ evbuffer_peek_all( struct evbuffer * buf, size_t * setme_vecCount )
const size_t byteCount = evbuffer_get_length( buf );
const int vecCount = evbuffer_peek( buf, byteCount, NULL, NULL, 0 );
struct evbuffer_iovec * iovec = tr_new0( struct evbuffer_iovec, vecCount );
assert( vecCount == evbuffer_peek( buf, byteCount, NULL, iovec, vecCount ) );
const int n = evbuffer_peek( buf, byteCount, NULL, iovec, vecCount );
assert( n == vecCount );
*setme_vecCount = vecCount;
return iovec;
}