diff options
-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 | ||