Skip to content

Commit f0890e2

Browse files
committed
Fixed problem with NAWS where the client would always send NAWS data if requested
1 parent 70e578c commit f0890e2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

telnet_phases.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,14 @@ void CMUSHclientDoc::Phase_DO (const unsigned char c)
390390

391391
case TELOPT_NAWS:
392392
// option off - must be server initiated
393-
if (!m_bNAWS)
393+
if (m_bNAWS)
394+
{
394395
Send_IAC_WILL (c);
395-
m_bNAWS_wanted = true;
396-
SendWindowSizes (m_nWrapColumn);
396+
m_bNAWS_wanted = true;
397+
SendWindowSizes (m_nWrapColumn);
398+
}
399+
else
400+
Send_IAC_WONT (c);
397401
break;
398402

399403
case TELOPT_MXP:

0 commit comments

Comments
 (0)