1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Delay starting login process until option negotiation is complete to

avoid race condition on connections with larger round-trip-times.

Submitted by:	John Capo & Peter Wemm
This commit is contained in:
Paul Traina 1995-09-05 17:34:29 +00:00
parent 08ab924c0d
commit 575ecb340a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10560

View File

@ -740,11 +740,7 @@ char *hostname;
char host_name[MAXHOSTNAMELEN];
char remote_host_name[MAXHOSTNAMELEN];
#ifndef convex
extern void telnet P((int, int));
#else
extern void telnet P((int, int, char *));
#endif
/*
* Get a pty, scan input lines.
@ -834,12 +830,6 @@ doit(who)
level = getterminaltype(user_name);
setenv("TERM", terminaltype ? terminaltype : "network", 1);
/*
* Start up the login process on the slave side of the terminal
*/
#ifndef convex
startslave(host, level, user_name);
#if defined(_SC_CRAY_SECURE_SYS)
if (secflag) {
if (setulvl(dv.dv_actlvl) < 0)
@ -849,10 +839,8 @@ doit(who)
}
#endif /* _SC_CRAY_SECURE_SYS */
telnet(net, pty); /* begin server processing */
#else
telnet(net, pty, host);
#endif
telnet(net, pty, host); /* begin server process */
/*NOTREACHED*/
} /* end of doit */
@ -876,15 +864,9 @@ Xterm_output(ibufp, obuf, icountp, ocount)
* hand data to telnet receiver finite state machine.
*/
void
#ifndef convex
telnet(f, p)
#else
telnet(f, p, host)
#endif
int f, p;
#ifdef convex
char *host;
#endif
{
int on = 1;
#define TABBUFSIZ 512
@ -1120,9 +1102,12 @@ telnet(f, p, host)
{sprintf(nfrontp, "td: Entering processing loop\r\n");
nfrontp += strlen(nfrontp);});
#ifdef convex
/*
* Startup the login process on the slave side of the terminal
* now. We delay this until here to insure option negotiation
* is complete.
*/
startslave(host);
#endif
for (;;) {
fd_set ibits, obits, xbits;