]> git.ozlabs.org Git - ppp.git/commitdiff
only clear CRTSCTS if -crtscts option given
authorPaul Mackerras <paulus@samba.org>
Fri, 16 Sep 1994 02:35:42 +0000 (02:35 +0000)
committerPaul Mackerras <paulus@samba.org>
Fri, 16 Sep 1994 02:35:42 +0000 (02:35 +0000)
pppd/sys-bsd.c
pppd/sys-str.c

index 7ffa14615f4ac9e33cf26aa407b64edcaa795b20..df9dfba3f11c0bcda4448bba77ec19c9fb6d82e3 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-bsd.c,v 1.11 1994/09/16 02:17:43 paulus Exp $";
+static char rcsid[] = "$Id: sys-bsd.c,v 1.12 1994/09/16 02:35:27 paulus Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -201,9 +201,11 @@ set_up_tty(fd, local)
     if (!restore_term)
        inittermios = tios;
 
     if (!restore_term)
        inittermios = tios;
 
-    tios.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CLOCAL | CRTSCTS);
-    if (crtscts == 1)
+    tios.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CLOCAL);
+    if (crtscts > 0)
        tios.c_cflag |= CRTSCTS;
        tios.c_cflag |= CRTSCTS;
+    else if (crtscts < 0)
+       tios.c_cflag &= ~CRTSCTS;
 
     tios.c_cflag |= CS8 | CREAD | HUPCL;
     if (local || !modem)
 
     tios.c_cflag |= CS8 | CREAD | HUPCL;
     if (local || !modem)
index aed7c8ee47d96844e719a04c9116da883094a4ee..2dc7e968928f1571a216a2867d58c92ecfd03281 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-str.c,v 1.12 1994/09/16 02:18:01 paulus Exp $";
+static char rcsid[] = "$Id: sys-str.c,v 1.13 1994/09/16 02:35:42 paulus Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -387,9 +387,11 @@ set_up_tty(fd, local)
     if (!restore_term)
        inittermios = tios;
 
     if (!restore_term)
        inittermios = tios;
 
-    tios.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CLOCAL | CRTSCTS);
-    if (crtscts == 1)
+    tios.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CLOCAL);
+    if (crtscts > 0)
        tios.c_cflag |= CRTSCTS;
        tios.c_cflag |= CRTSCTS;
+    else if (crtscts < 0)
+       tios.c_cflag &= ~CRTSCTS;
 
     tios.c_cflag |= CS8 | CREAD | HUPCL;
     if (local || !modem)
 
     tios.c_cflag |= CS8 | CREAD | HUPCL;
     if (local || !modem)