diff options
author | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-05-10 17:14:32 +0000 |
---|---|---|
committer | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-05-10 17:14:32 +0000 |
commit | 2a2c5e24268e31c9189a1f6debd4c52f97000ebc (patch) | |
tree | 478cd2ba1e877dd3e8caf0d7a51440af8c5ec8ab | |
parent | 0e736fe8cd692ec5418d615a12237470b2a7dff5 (diff) | |
download | busybox-w32-2a2c5e24268e31c9189a1f6debd4c52f97000ebc.tar.gz busybox-w32-2a2c5e24268e31c9189a1f6debd4c52f97000ebc.tar.bz2 busybox-w32-2a2c5e24268e31c9189a1f6debd4c52f97000ebc.zip |
some more useful debug info from Jason Holden
git-svn-id: svn://busybox.net/trunk/busybox@15052 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | networking/telnetd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/networking/telnetd.c b/networking/telnetd.c index f2ca287cb..7b3c69898 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | /*#define DEBUG 1 */ | 24 | /*#define DEBUG 1 */ |
25 | #undef DEBUG | ||
25 | 26 | ||
26 | #include <sys/time.h> | 27 | #include <sys/time.h> |
27 | #include <sys/socket.h> | 28 | #include <sys/socket.h> |
@@ -223,6 +224,9 @@ getpty(char *line) | |||
223 | } | 224 | } |
224 | for (j = 0; j < 16; j++) { | 225 | for (j = 0; j < 16; j++) { |
225 | line[9] = j < 10 ? j + '0' : j - 10 + 'a'; | 226 | line[9] = j < 10 ? j + '0' : j - 10 + 'a'; |
227 | #ifdef DEBUG | ||
228 | fprintf(stderr, "Trying to open device: %s\n", line); | ||
229 | #endif | ||
226 | if ((p = open(line, O_RDWR | O_NOCTTY)) >= 0) { | 230 | if ((p = open(line, O_RDWR | O_NOCTTY)) >= 0) { |
227 | line[5] = 't'; | 231 | line[5] = 't'; |
228 | return p; | 232 | return p; |
@@ -277,7 +281,7 @@ make_new_session(int sockfd) | |||
277 | pty = getpty(tty_name); | 281 | pty = getpty(tty_name); |
278 | 282 | ||
279 | if (pty < 0) { | 283 | if (pty < 0) { |
280 | syslog(LOG_ERR, "All network ports in use!"); | 284 | syslog(LOG_ERR, "All terminals in use!"); |
281 | return 0; | 285 | return 0; |
282 | } | 286 | } |
283 | 287 | ||