summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-07-19 14:07:38 +0400
committerKozlov Dmitry <xeb@mail.ru>2012-07-19 14:07:38 +0400
commit918036a3c42cb6dd5b796c52b6aaf278c466c928 (patch)
tree57222e9b75e872d02f2d279cb8f351c8142ba60e /accel-pppd
parent178b27b0b6d60afdc5039dc3d995f4ad000b5486 (diff)
downloadaccel-ppp-918036a3c42cb6dd5b796c52b6aaf278c466c928.tar.gz
accel-ppp-918036a3c42cb6dd5b796c52b6aaf278c466c928.zip
cli: telnet: check for disconnect condition while processing input chars
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/cli/telnet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/cli/telnet.c b/accel-pppd/cli/telnet.c
index f7b43115..314ac9e9 100644
--- a/accel-pppd/cli/telnet.c
+++ b/accel-pppd/cli/telnet.c
@@ -484,7 +484,7 @@ static int cln_read(struct triton_md_handler_t *h)
}
/*log_debug("cli: read(%i): ", n);
print_buf(cln->recv_buf + cln->recv_pos, n);*/
- for (i = 0; i < n; i++) {
+ for (i = 0; i < n && !cln->disconnect; i++) {
if (telnet_input_char(cln, recv_buf[i]))
break;
}