diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2010-12-19 10:43:13 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2010-12-19 10:43:13 +0300 |
commit | ceae1bd99487b1fa9e46ebe08def3b3727867889 (patch) | |
tree | ee5fc215376d37b5e4ee1068249fb670a9668a58 | |
parent | aff9ec94d82bb46235da0b4be1b2e5e9c9dafbc2 (diff) | |
download | accel-ppp-ceae1bd99487b1fa9e46ebe08def3b3727867889.tar.gz accel-ppp-ceae1bd99487b1fa9e46ebe08def3b3727867889.zip |
cli: ctrl-c to disconnect
-rw-r--r-- | accel-pptpd/cli/telnet.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/accel-pptpd/cli/telnet.c b/accel-pptpd/cli/telnet.c index 056cb30..256f236 100644 --- a/accel-pptpd/cli/telnet.c +++ b/accel-pptpd/cli/telnet.c @@ -249,7 +249,7 @@ static int telnet_input_char(struct telnet_client_t *cln, uint8_t c) { uint8_t buf[] = {IAC, DONT, 0}; struct buffer_t *b; - + if (c == '\n') return 0; @@ -407,6 +407,9 @@ static int telnet_input_char(struct telnet_client_t *cln, uint8_t c) cln->cmdline_len--; } return 0; + case 3: + disconnect(cln); + return -1; } if (isprint(c)) { |