From 5cf66661e51de6403476220da85603476105f386 Mon Sep 17 00:00:00 2001 From: Sean Middleditch Date: Sun, 15 Mar 2009 20:02:14 -0400 Subject: [PATCH] actually send error info in error event --- libtelnet.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libtelnet.c b/libtelnet.c index e4f14c1..4d53d2a 100644 --- a/libtelnet.c +++ b/libtelnet.c @@ -63,7 +63,7 @@ static void _error(struct libtelnet_t *telnet, unsigned line, const char* func, va_end(va); _event(telnet, fatal ? LIBTELNET_EV_ERROR : LIBTELNET_EV_WARNING, err, - 0, 0, 0); + 0, (unsigned char *)buffer, strlen(buffer)); } /* initialize the zlib box for a telnet box; if deflate is non-zero, it @@ -292,8 +292,7 @@ static void _process(struct libtelnet_t *telnet, unsigned char *buffer, (telnet->mode == LIBTELNET_MODE_CLIENT || telnet->mode == LIBTELNET_MODE_PROXY)) { - if ((telnet->z_inflate = _init_zlib(telnet, 0, 1)) - == 0) + if ((telnet->z_inflate = _init_zlib(telnet, 0, 1)) == 0) break; /* notify app that compression was enabled */