diff options
Diffstat (limited to 'networking/telnetd.c')
-rw-r--r-- | networking/telnetd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/telnetd.c b/networking/telnetd.c index d5de8903c..73303a20a 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
@@ -94,7 +94,7 @@ struct tsession { | |||
94 | +-------+ wridx1++ +------+ rdidx1++ +----------+ | 94 | +-------+ wridx1++ +------+ rdidx1++ +----------+ |
95 | | | <-------------- | buf1 | <-------------- | | | 95 | | | <-------------- | buf1 | <-------------- | | |
96 | | | size1-- +------+ size1++ | | | 96 | | | size1-- +------+ size1++ | | |
97 | | pty | | socket | | 97 | | pty | | socket | |
98 | | | rdidx2++ +------+ wridx2++ | | | 98 | | | rdidx2++ +------+ wridx2++ | | |
99 | | | --------------> | buf2 | --------------> | | | 99 | | | --------------> | buf2 | --------------> | | |
100 | +-------+ size2++ +------+ size2-- +----------+ | 100 | +-------+ size2++ +------+ size2-- +----------+ |
@@ -166,7 +166,7 @@ remove_iacs(struct tsession *ts, int *pnum_totty) { | |||
166 | else if (ptr[1] == SB && ptr[2] == TELOPT_NAWS) { | 166 | else if (ptr[1] == SB && ptr[2] == TELOPT_NAWS) { |
167 | struct winsize ws; | 167 | struct winsize ws; |
168 | if ((ptr+8) >= end) | 168 | if ((ptr+8) >= end) |
169 | break; /* incomplete, can't process */ | 169 | break; /* incomplete, can't process */ |
170 | ws.ws_col = (ptr[3] << 8) | ptr[4]; | 170 | ws.ws_col = (ptr[3] << 8) | ptr[4]; |
171 | ws.ws_row = (ptr[5] << 8) | ptr[6]; | 171 | ws.ws_row = (ptr[5] << 8) | ptr[6]; |
172 | (void) ioctl(ts->ptyfd, TIOCSWINSZ, (char *)&ws); | 172 | (void) ioctl(ts->ptyfd, TIOCSWINSZ, (char *)&ws); |
@@ -383,7 +383,7 @@ int | |||
383 | telnetd_main(int argc, char **argv) | 383 | telnetd_main(int argc, char **argv) |
384 | { | 384 | { |
385 | #ifndef CONFIG_FEATURE_TELNETD_INETD | 385 | #ifndef CONFIG_FEATURE_TELNETD_INETD |
386 | sockaddr_type sa; | 386 | sockaddr_type sa; |
387 | int master_fd; | 387 | int master_fd; |
388 | #endif /* CONFIG_FEATURE_TELNETD_INETD */ | 388 | #endif /* CONFIG_FEATURE_TELNETD_INETD */ |
389 | fd_set rdfdset, wrfdset; | 389 | fd_set rdfdset, wrfdset; |
@@ -446,7 +446,7 @@ telnetd_main(int argc, char **argv) | |||
446 | 446 | ||
447 | /* Grab a TCP socket. */ | 447 | /* Grab a TCP socket. */ |
448 | 448 | ||
449 | master_fd = socket(SOCKET_TYPE, SOCK_STREAM, 0); | 449 | master_fd = socket(SOCKET_TYPE, SOCK_STREAM, 0); |
450 | if (master_fd < 0) { | 450 | if (master_fd < 0) { |
451 | bb_perror_msg_and_die("socket"); | 451 | bb_perror_msg_and_die("socket"); |
452 | } | 452 | } |