diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-08-20 14:43:16 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-09-28 15:41:33 +0200 |
commit | 90e2026b99d27819429cccadeffd0f41d92601a9 (patch) | |
tree | a12e4d3da244d851aa06bd8688847ae7bcc7ab62 /cpukit/telnetd | |
parent | telnetd: Inform client that we will echo (diff) | |
download | rtems-90e2026b99d27819429cccadeffd0f41d92601a9.tar.bz2 |
telnetd: Map CRLF to CR
It is not so easy to use Termios for that. We already map CRNUL to CR,
thus we cannot ignore CRs. We could change the shell code to map CRNL
to a single line end, but this is more intrusive than the change here.
Diffstat (limited to 'cpukit/telnetd')
-rw-r--r-- | cpukit/telnetd/pty.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/telnetd/pty.c b/cpukit/telnetd/pty.c index 9d3e48f043..30bfe98951 100644 --- a/cpukit/telnetd/pty.c +++ b/cpukit/telnetd/pty.c @@ -306,10 +306,9 @@ static int read_pty(int minor) } else { result=value; if ( 0 -#if 0 /* pass CRLF through - they should use termios to handle it */ - || ((value=='\n') && (pty->last_cr)) -#endif - /* but map telnet CRNUL to CR down here */ + /* map CRLF to CR for symmetry */ + || ((value=='\n') && pty->last_cr) + /* map telnet CRNUL to CR down here */ || ((value==0) && pty->last_cr) ) result=-1; pty->last_cr=(value=='\r'); |