From: Jordan Lee Date: Tue, 8 Feb 2011 00:31:50 +0000 (+0000) Subject: (libT) #3991 "Connection encryption stopped working" -- fixed. X-Git-Tag: 2.21~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=394fed632f5bf8c244b49b0024dcd9e260a83d54;p=transmission (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(). --- diff --git a/libtransmission/peer-io.c b/libtransmission/peer-io.c index 64091528b..85884410d 100644 --- a/libtransmission/peer-io.c +++ b/libtransmission/peer-io.c @@ -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; }