drivers/telnet: Refused to enter character mode
Refuse SGA to work in line mode, it's OK for modern rich featured telnet clients. Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
8355ab9070
commit
9de449c8b6
@ -416,7 +416,16 @@ static ssize_t telnet_receive(FAR struct telnet_dev_s *priv,
|
||||
|
||||
case STATE_DO:
|
||||
|
||||
if ((priv->td_lflag & ECHO) != 0 && ch == TELNET_ECHO)
|
||||
if (ch == TELNET_SGA)
|
||||
{
|
||||
/* Reply with a WONT, that means we will not work in
|
||||
* character mode and stay in line mode,
|
||||
* it's OK for modern rich featured telnet clients.
|
||||
*/
|
||||
|
||||
telnet_sendopt(priv, TELNET_WONT, ch);
|
||||
}
|
||||
else if ((priv->td_lflag & ECHO) != 0 && ch == TELNET_ECHO)
|
||||
{
|
||||
telnet_sendopt(priv, TELNET_WONT, ch);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user