From e68511b144336ef6d705134c3fcbeb95633bc855 Mon Sep 17 00:00:00 2001 From: Sean Middleditch Date: Mon, 16 Mar 2009 01:12:50 -0400 Subject: [PATCH] fix receiving end of MCCP2 --- libtelnet.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libtelnet.c b/libtelnet.c index 8b07f6c..baf74f7 100644 --- a/libtelnet.c +++ b/libtelnet.c @@ -288,14 +288,10 @@ static void _process(libtelnet_t *telnet, unsigned char *buffer, telnet->sb_telopt, telnet->buffer, telnet->length); #ifdef HAVE_ZLIB - /* if we are a client or a proxy and just received the - * COMPRESS2 begin marker, setup our zlib box and start - * handling the compressed stream if it's not already. + /* received COMPRESS2 begin marker, setup our zlib box and + * start handling the compressed stream if it's not already. */ - if (telnet->sb_telopt == LIBTELNET_TELOPT_COMPRESS2 && - telnet->z == 0 && - telnet->flags & LIBTELNET_FLAG_PROXY) { - + if (telnet->sb_telopt == LIBTELNET_TELOPT_COMPRESS2) { if (_init_zlib(telnet, 0, 1) != LIBTELNET_EOK) break;