Changeset 90e2026 in rtems


Ignore:
Timestamp:
Aug 20, 2012, 12:43:16 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
afd1967
Parents:
e652e5f8
git-author:
Sebastian Huber <sebastian.huber@…> (08/20/12 12:43:16)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/28/12 13:41:33)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/telnetd/pty.c

    re652e5f8 r90e2026  
    307307              result=value;
    308308              if ( 0
    309 #if 0               /* pass CRLF through - they should use termios to handle it */
    310                  ||  ((value=='\n') && (pty->last_cr))
    311 #endif
    312                 /* but map telnet CRNUL to CR down here */
     309                /* map CRLF to CR for symmetry */
     310                 || ((value=='\n') && pty->last_cr)
     311                /* map telnet CRNUL to CR down here */
    313312                 || ((value==0) && pty->last_cr)
    314313                ) result=-1;
Note: See TracChangeset for help on using the changeset viewer.