diff options
Diffstat (limited to 'src/telnet.c')
| -rw-r--r-- | src/telnet.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/telnet.c b/src/telnet.c index 9e664ea..12c9533 100644 --- a/src/telnet.c +++ b/src/telnet.c @@ -46,7 +46,8 @@ int telnet_handle_command(const unsigned char *buf) { ECHO, "ECHO" }, { SGA, "SGA" }, { STATUS, "STATUS" }, - { NAWS, "NAWS" } + { NAWS, "NAWS" }, + { IP, "IP" }, }; for(unsigned int i = 0; i < ARRAYLEN(commands); ++i) @@ -55,16 +56,11 @@ int telnet_handle_command(const unsigned char *buf) { debugf("%s ", commands[i].name); cmd = true; + if(c == IP) + return TELNET_EXIT; goto found; } } - switch(c) - { - case IP: - return TELNET_EXIT; - default: - break; - } debugf("???: %d ", c); found: |