diff options
author | pst <pst@FreeBSD.org> | 1997-01-07 19:47:58 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1997-01-07 19:47:58 +0000 |
commit | 8f7e8a658530e1968aabc0ac0f782fbed303d4bf (patch) | |
tree | 2dff9a048bc39e15cd0278ea5f5782688eeb49af /usr.bin/telnet/telnet.c | |
parent | 46b285b874270033b54c235b591d75d3042191ab (diff) | |
download | FreeBSD-src-8f7e8a658530e1968aabc0ac0f782fbed303d4bf.zip FreeBSD-src-8f7e8a658530e1968aabc0ac0f782fbed303d4bf.tar.gz |
Import a few relatively minor fixes from current Borman telnet.
Add some buffer overrun fixes from OpenBSD and myself.
Add skey calculator kludge from OpenBSD.
TODO: do a real merge of dab's sources... probably just make telnet and
telnetd contrib software.
Obtained from: OpenBSD, dab@bsdi.com
Diffstat (limited to 'usr.bin/telnet/telnet.c')
-rw-r--r-- | usr.bin/telnet/telnet.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/telnet/telnet.c b/usr.bin/telnet/telnet.c index ea0ac92..3f735a8 100644 --- a/usr.bin/telnet/telnet.c +++ b/usr.bin/telnet/telnet.c @@ -57,7 +57,7 @@ static char sccsid[] = "@(#)telnet.c 8.2 (Berkeley) 12/15/93"; #include "general.h" -#define strip(x) ((x)&0x7f) +#define strip(x) ((my_want_state_is_wont(TELOPT_BINARY)) ? ((x)&0x7f) : (x)) static unsigned char subbuffer[SUBBUFSIZE], *subpointer, *subend; /* buffer for sub-options */ @@ -104,7 +104,8 @@ int donelclchars, /* the user has set "localchars" */ donebinarytoggle, /* the user has put us in binary */ dontlecho, /* do we suppress local echoing right now? */ - globalmode; + globalmode, + clienteof = 0; char *prompt = 0; @@ -2097,9 +2098,9 @@ Scheduler(block) ttyout = ring_full_count(&ttyoring); #if defined(TN3270) - ttyin = ring_empty_count(&ttyiring) && (shell_active == 0); + ttyin = ring_empty_count(&ttyiring) && (clienteof == 0) && (shell_active == 0); #else /* defined(TN3270) */ - ttyin = ring_empty_count(&ttyiring); + ttyin = ring_empty_count(&ttyiring) && (clienteof == 0); #endif /* defined(TN3270) */ #if defined(TN3270) |