diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-04-12 18:24:37 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-04-12 18:24:37 +0000 |
commit | 67f641e75b685abe1588b634b409c1ee2ff68c22 (patch) | |
tree | 74b3e38f1b7caef23bbf06a92b6e5d05530d50a6 /networking/telnetd.c | |
parent | 2c99851181a652358aa3ca58ef38c57e46ae02e4 (diff) | |
download | busybox-w32-67f641e75b685abe1588b634b409c1ee2ff68c22.tar.gz busybox-w32-67f641e75b685abe1588b634b409c1ee2ff68c22.tar.bz2 busybox-w32-67f641e75b685abe1588b634b409c1ee2ff68c22.zip |
- patch from Denis Vlasenko to add bb_xbind() and bb_xlisten()
Diffstat (limited to 'networking/telnetd.c')
-rw-r--r-- | networking/telnetd.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/networking/telnetd.c b/networking/telnetd.c index d53f56b14..1a53c0c0c 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
@@ -461,14 +461,8 @@ telnetd_main(int argc, char **argv) | |||
461 | sa.sin_addr = bind_addr; | 461 | sa.sin_addr = bind_addr; |
462 | #endif | 462 | #endif |
463 | 463 | ||
464 | if (bind(master_fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) { | 464 | bb_xbind(master_fd, (struct sockaddr *) &sa, sizeof(sa)); |
465 | bb_perror_msg_and_die("bind"); | 465 | bb_xlisten(master_fd, 1); |
466 | } | ||
467 | |||
468 | if (listen(master_fd, 1) < 0) { | ||
469 | bb_perror_msg_and_die("listen"); | ||
470 | } | ||
471 | |||
472 | bb_xdaemon(0, 0); | 466 | bb_xdaemon(0, 0); |
473 | 467 | ||
474 | maxfd = master_fd; | 468 | maxfd = master_fd; |