diff options
-rw-r--r-- | networking/telnet.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/telnet.c b/networking/telnet.c index d2daf5c8c..1a6986b94 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -311,15 +311,16 @@ static void put_iac(int c) | |||
311 | G.iacbuf[G.iaclen++] = c; | 311 | G.iacbuf[G.iaclen++] = c; |
312 | } | 312 | } |
313 | 313 | ||
314 | static void put_iac2(byte wwdd, byte c) | 314 | static void put_iac2_merged(unsigned wwdd_and_c) |
315 | { | 315 | { |
316 | if (G.iaclen + 3 > IACBUFSIZE) | 316 | if (G.iaclen + 3 > IACBUFSIZE) |
317 | iac_flush(); | 317 | iac_flush(); |
318 | 318 | ||
319 | put_iac(IAC); | 319 | put_iac(IAC); |
320 | put_iac(wwdd); | 320 | put_iac(wwdd_and_c >> 8); |
321 | put_iac(c); | 321 | put_iac(wwdd_and_c & 0xff); |
322 | } | 322 | } |
323 | #define put_iac2(wwdd,c) put_iac2_merged(((wwdd)<<8) + (c)) | ||
323 | 324 | ||
324 | #if ENABLE_FEATURE_TELNET_TTYPE | 325 | #if ENABLE_FEATURE_TELNET_TTYPE |
325 | static void put_iac_subopt(byte c, char *str) | 326 | static void put_iac_subopt(byte c, char *str) |