From d8d46517b95f3f734b0c327e999ec856e2ab10ed Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 22 Sep 2007 21:48:02 +0000 Subject: [PATCH] fix a couple of encryption bugs. --- libtransmission/peer-io.c | 2 +- libtransmission/peer-mgr.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libtransmission/peer-io.c b/libtransmission/peer-io.c index 0d689079c..918a70c18 100644 --- a/libtransmission/peer-io.c +++ b/libtransmission/peer-io.c @@ -454,7 +454,7 @@ tr_peerIoWriteBytes( tr_peerIo * io, /*fprintf( stderr, "encrypting and writing %d bytes to outbuf...\n", byteCount );*/ tmp = tr_new( uint8_t, byteCount ); tr_cryptoEncrypt( io->crypto, byteCount, bytes, tmp ); - tr_bufferevent_write( io->handle, io->bufev, tmp, byteCount ); + evbuffer_add( outbuf, tmp, byteCount ); tr_free( tmp ); break; diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index 5f8f7f247..811f825aa 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -1261,6 +1261,8 @@ reconnectPulse( void * vt UNUSED ) initiateHandshake( manager, io ); --left; } + + tr_free( pool ); } return TRUE;