Skip to content

Commit

Permalink
Fixed bug in telnet negotations for IAC WILL ECHO and IAC WONT ECHO
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Jul 21, 2014
1 parent 2de2d11 commit c284ba5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions telnet_phases.cpp
Expand Up @@ -288,10 +288,13 @@ void CMUSHclientDoc::Phase_WILL (const unsigned char c)

case TELOPT_ECHO:
if (!m_bNoEchoOff)
{
m_bNoEcho = true;
TRACE ("Echo turned off\n");
}
{
m_bNoEcho = true;
TRACE ("Echo turned off\n");
Send_IAC_DO (c);
}
else
Send_IAC_DONT (c);
break; // end of TELOPT_ECHO

case TELOPT_MXP:
Expand Down Expand Up @@ -352,7 +355,8 @@ void CMUSHclientDoc::Phase_WONT (const unsigned char c)
m_bNoEcho = false;
TRACE ("Echo turned on\n");
}
break; // end of TELOPT_ECHO
Send_IAC_DONT (c);
break; // end of TELOPT_ECHO

default:
Send_IAC_DONT (c);
Expand Down

0 comments on commit c284ba5

Please sign in to comment.