From 394fed632f5bf8c244b49b0024dcd9e260a83d54 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Tue, 8 Feb 2011 00:31:50 +0000 Subject: [PATCH] (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(). --- libtransmission/peer-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }