From 8fd5458841cf64a26683da84722ed595a0ded7f5 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 1 Feb 2004 17:17:08 +0000 Subject: [PATCH] updated telnet filter --- mbcico/telnet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mbcico/telnet.c b/mbcico/telnet.c index 8828a038..9b0914aa 100644 --- a/mbcico/telnet.c +++ b/mbcico/telnet.c @@ -106,7 +106,7 @@ void telout_filter(int fdi, int fdo) while ((rc = read(fdi, &ch, 1)) > 0) { c = (int)ch & 0xff; if (c == IAC) { - Syslog('s', "telout_filter: got IAC"); + Syslog('s', "telout_filter: got IAC sending twice"); /* * Escape IAC characters by sending it twice. */ @@ -163,8 +163,9 @@ void telin_filter(int fdo, int fdi) m = (int)ch & 0xff; Syslog('s', "Telnet: recv DONT %d", m); break; - case IAC: ch = (char)m & 0xff; + case IAC: ch = (char)m; rc = write(fdo, &ch, 1); + Syslog('s', "Telnet: got escaped IAC"); break; default: Syslog('s', "Telnet: recv IAC %d, not good", m); break;