fix receiving end of MCCP2

This commit is contained in:
Sean Middleditch 2009-03-16 01:12:50 -04:00
parent 4611d911d5
commit e68511b144
1 changed files with 3 additions and 7 deletions

View File

@ -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;