From 4611d911d595d8b8215810e3b7bf21a82b06d813 Mon Sep 17 00:00:00 2001 From: Sean Middleditch Date: Mon, 16 Mar 2009 00:53:57 -0400 Subject: [PATCH] rather critical fix --- libtelnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtelnet.c b/libtelnet.c index 4f8461f..8b07f6c 100644 --- a/libtelnet.c +++ b/libtelnet.c @@ -348,7 +348,7 @@ void libtelnet_push(libtelnet_t *telnet, unsigned char *buffer, unsigned int size) { #ifdef HAVE_ZLIB /* if we have an inflate (decompression) zlib stream, use it */ - if (telnet->z != 0) { + if (telnet->z != 0 && !(telnet->flags & LIBTELNET_PFLAG_DEFLATE)) { unsigned char inflate_buffer[4096]; int rs; @@ -398,7 +398,7 @@ static void _send(libtelnet_t *telnet, unsigned char *buffer, unsigned int size) { #ifdef HAVE_ZLIB /* if we have a deflate (compression) zlib box, use it */ - if (telnet->z != 0) { + if (telnet->z != 0 && telnet->flags & LIBTELNET_PFLAG_DEFLATE) { unsigned char deflate_buffer[1024]; int rs;