aboutsummaryrefslogtreecommitdiff
path: root/src/telnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/telnet.c')
-rw-r--r--src/telnet.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/telnet.c b/src/telnet.c
index 173574b..038c54c 100644
--- a/src/telnet.c
+++ b/src/telnet.c
@@ -18,7 +18,7 @@
#include "netcosm.h"
-void telnet_handle_command(const unsigned char *buf)
+int telnet_handle_command(const unsigned char *buf)
{
bool cmd = false;
@@ -58,7 +58,7 @@ void telnet_handle_command(const unsigned char *buf)
switch(c)
{
case IP:
- exit(0);
+ return TELNET_EXIT;
default:
break;
}
@@ -70,6 +70,8 @@ void telnet_handle_command(const unsigned char *buf)
if(cmd)
debugf("\n");
+
+ return TELNET_OK;
}
void telnet_echo_off(void)