From 7ebaa22e1ced3b9c34969ec110248db8487a3205 Mon Sep 17 00:00:00 2001 From: Thomas Ferrin Date: Fri, 22 Nov 1985 13:48:12 -0800 Subject: [PATCH] Must set linebaudrate variable when in slave mode too. SCCS-vsn: usr.bin/uucp/uucico/cico.c 5.10 SCCS-vsn: usr.bin/uucp/uucico/conn.c 5.8 --- usr/src/usr.bin/uucp/uucico/cico.c | 5 +++-- usr/src/usr.bin/uucp/uucico/conn.c | 35 +++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/usr/src/usr.bin/uucp/uucico/cico.c b/usr/src/usr.bin/uucp/uucico/cico.c index fb00a0e374..db7fb33a5a 100644 --- a/usr/src/usr.bin/uucp/uucico/cico.c +++ b/usr/src/usr.bin/uucp/uucico/cico.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)cico.c 5.9 (Berkeley) %G%"; +static char sccsid[] = "@(#)cico.c 5.10 (Berkeley) %G%"; #endif #include @@ -178,7 +178,7 @@ register char *argv[]; } #endif TIOCNOTTY #ifdef BSD4_2 - if (getpgrp(0) == 0) { /*We have no controlling terminal */ + if (getpgrp(0) == 0) { /* We have no controlling terminal */ setpgrp(0, getpid()); } #endif BSD4_2 @@ -223,6 +223,7 @@ register char *argv[]; Ifn = 0; Ofn = 1; fixmode(Ifn); + getbaud(Ifn); sprintf(file,"%s/%d", RMTDEBUG, getpid()); #ifdef VMS /* hold the version number down */ diff --git a/usr/src/usr.bin/uucp/uucico/conn.c b/usr/src/usr.bin/uucp/uucico/conn.c index fcf48e71db..b77096df27 100644 --- a/usr/src/usr.bin/uucp/uucico/conn.c +++ b/usr/src/usr.bin/uucp/uucico/conn.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)conn.c 5.7 (Berkeley) %G%"; +static char sccsid[] = "@(#)conn.c 5.8 (Berkeley) %G%"; #endif #include @@ -471,6 +471,39 @@ int tty, spwant; return SUCCESS; } +/*** + * getbaud(tty) set linebaudrate variable + * + * return codes: none + */ + +getbaud(tty) +int tty; +{ +#ifdef USG + struct termio ttbuf; +#else + struct sgttyb ttbuf; +#endif + register struct sg_spds *ps; + register int name; + + if (IsTcpIp) + return; +#ifdef USG + ioctl(tty, TCGETA, &ttbuf); + name = ttbuf.c_cflag & CBAUD; +#else + ioctl(tty, TIOCGETP, &ttbuf); + name = ttbuf.sg_ispeed; +#endif + for (ps = spds; ps->sp_val; ps++) + if (ps->sp_name == name) { + linebaudrate = ps->sp_val; + break; + } +} + #define MR 100 /* -- 2.20.1