summaryrefslogtreecommitdiffstats
path: root/libexec/telnetd/termstat.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2001-08-20 12:12:27 +0000
committermarkm <markm@FreeBSD.org>2001-08-20 12:12:27 +0000
commit162b7bf01cdec6fdf0f84d400df0f67c2a0d35c0 (patch)
tree4d7561d04274e34e61f214475d7604ce09ffe37d /libexec/telnetd/termstat.c
parent600042995ae97655a86cbb858298dc63ffca800f (diff)
downloadFreeBSD-src-162b7bf01cdec6fdf0f84d400df0f67c2a0d35c0.zip
FreeBSD-src-162b7bf01cdec6fdf0f84d400df0f67c2a0d35c0.tar.gz
Feature merging and diff reduction between this code and crypto telnet.
Also remove conditional (AUTHENTICATION) code as we have never compiled it here, and it is doubtful that it even works in this scenario.
Diffstat (limited to 'libexec/telnetd/termstat.c')
-rw-r--r--libexec/telnetd/termstat.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/libexec/telnetd/termstat.c b/libexec/telnetd/termstat.c
index 2a5c74c..c36e798 100644
--- a/libexec/telnetd/termstat.c
+++ b/libexec/telnetd/termstat.c
@@ -33,7 +33,7 @@
#ifndef lint
#if 0
-static char sccsid[] = "@(#)termstat.c 8.1 (Berkeley) 6/4/93";
+static const char sccsid[] = "@(#)termstat.c 8.2 (Berkeley) 5/30/95";
#endif
static const char rcsid[] =
"$FreeBSD$";
@@ -165,34 +165,33 @@ localstat()
tty_setlinemode(uselinemode);
}
- if (uselinemode) {
-
- /*
- * Check for state of BINARY options.
- *
- * We only need to do the binary dance if we are actually going
- * to use linemode. As this confuses some telnet clients that dont
- * support linemode, and doesnt gain us anything, we dont do it
- * unless we're doing linemode. -Crh (henrich@msu.edu)
- */
-
- if (tty_isbinaryin()) {
- if (his_want_state_is_wont(TELOPT_BINARY))
- send_do(TELOPT_BINARY, 1);
- } else {
- if (his_want_state_is_will(TELOPT_BINARY))
- send_dont(TELOPT_BINARY, 1);
- }
-
- if (tty_isbinaryout()) {
- if (my_want_state_is_wont(TELOPT_BINARY))
- send_will(TELOPT_BINARY, 1);
- } else {
- if (my_want_state_is_will(TELOPT_BINARY))
- send_wont(TELOPT_BINARY, 1);
- }
+ if (uselinemode) {
+ /*
+ * Check for state of BINARY options.
+ *
+ * We only need to do the binary dance if we are actually going
+ * to use linemode. As this confuses some telnet clients
+ * that don't support linemode, and doesn't gain us
+ * anything, we don't do it unless we're doing linemode.
+ * -Crh (henrich@msu.edu)
+ */
- }
+ if (tty_isbinaryin()) {
+ if (his_want_state_is_wont(TELOPT_BINARY))
+ send_do(TELOPT_BINARY, 1);
+ } else {
+ if (his_want_state_is_will(TELOPT_BINARY))
+ send_dont(TELOPT_BINARY, 1);
+ }
+
+ if (tty_isbinaryout()) {
+ if (my_want_state_is_wont(TELOPT_BINARY))
+ send_will(TELOPT_BINARY, 1);
+ } else {
+ if (my_want_state_is_will(TELOPT_BINARY))
+ send_wont(TELOPT_BINARY, 1);
+ }
+ }
/*
* Do echo mode handling as soon as we know what the
@@ -618,7 +617,7 @@ defer_terminit()
if (def_col || def_row) {
struct winsize ws;
- bzero((char *)&ws, sizeof(ws));
+ memset((char *)&ws, 0, sizeof(ws));
ws.ws_col = def_col;
ws.ws_row = def_row;
(void) ioctl(pty, TIOCSWINSZ, (char *)&ws);
OpenPOWER on IntegriCloud