Updated telnet driver

This commit is contained in:
Michiel Broek
2004-02-01 17:04:00 +00:00
parent b8e86712d0
commit c1dc31b000
36 changed files with 48 additions and 232 deletions

View File

@@ -224,6 +224,12 @@ int opentcp(char *name)
Syslog('s', "stdout = %d", output_pipe[1]);
Syslog('s', "stdin = %d", input_pipe[0]);
if ((input_pipe[0] != 0) || (output_pipe[1] != 1)) {
WriteError("Failed to create pipes on stdin and stdout");
return -1;
}
Syslog('+', "Telnet I/O filters installed");
telnet_init(Fdo); /* Do we need that as originating system? */
f_flags=0;

View File

@@ -124,7 +124,7 @@ int session(faddr *a, node *nl, int role, int tp, char *dt)
* since it's now on stadin and stdout.
*/
Fdo = dup(0);
Syslog('s', "session: new socket %s", Fdo);
Syslog('s', "session: new socket %d", Fdo);
/*
* Close stdin and stdout so that when we create the pipes to
@@ -188,6 +188,11 @@ int session(faddr *a, node *nl, int role, int tp, char *dt)
Syslog('s', "stdout = %d", output_pipe[1]);
Syslog('s', "stdin = %d", input_pipe[0]);
if ((input_pipe[0] != 0) || (output_pipe[1] != 1)) {
WriteError("Failed to create pipes on stdin and stdout");
die(MBERR_TTYIO_ERROR);
}
Syslog('+', "Telnet I/O filters installed");
telnet_init(Fdo);
}
#endif