Must set linebaudrate variable when in slave mode too.
authorThomas Ferrin <tef@ucbvax.Berkeley.EDU>
Fri, 22 Nov 1985 21:48:12 +0000 (13:48 -0800)
committerThomas Ferrin <tef@ucbvax.Berkeley.EDU>
Fri, 22 Nov 1985 21:48:12 +0000 (13:48 -0800)
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
usr/src/usr.bin/uucp/uucico/conn.c

index fb00a0e..db7fb33 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)cico.c     5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)cico.c     5.10 (Berkeley) %G%";
 #endif
 
 #include <signal.h>
 #endif
 
 #include <signal.h>
@@ -178,7 +178,7 @@ register char *argv[];
        }
 #endif TIOCNOTTY
 #ifdef BSD4_2
        }
 #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
                setpgrp(0, getpid());
        }
 #endif BSD4_2
@@ -223,6 +223,7 @@ register char *argv[];
                Ifn = 0;
                Ofn = 1;
                fixmode(Ifn);
                Ifn = 0;
                Ofn = 1;
                fixmode(Ifn);
+               getbaud(Ifn);
                sprintf(file,"%s/%d", RMTDEBUG, getpid());
 #ifdef VMS
                /* hold the version number down */
                sprintf(file,"%s/%d", RMTDEBUG, getpid());
 #ifdef VMS
                /* hold the version number down */
index fcf48e7..b77096d 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)conn.c     5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)conn.c     5.8 (Berkeley) %G%";
 #endif
 
 #include <signal.h>
 #endif
 
 #include <signal.h>
@@ -471,6 +471,39 @@ int tty, spwant;
        return SUCCESS;
 }
 
        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
 
 /*
 #define MR 100
 
 /*