From: Paul Mackerras Date: Fri, 16 Sep 1994 02:35:42 +0000 (+0000) Subject: only clear CRTSCTS if -crtscts option given X-Git-Tag: RELEASE_2_3_6~862 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=61443cfc407bf7a4a7a3b205a1912be55f277ac1 only clear CRTSCTS if -crtscts option given --- diff --git a/pppd/sys-bsd.c b/pppd/sys-bsd.c index 7ffa146..df9dfba 100644 --- a/pppd/sys-bsd.c +++ b/pppd/sys-bsd.c @@ -19,7 +19,7 @@ */ #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 /* @@ -201,9 +201,11 @@ set_up_tty(fd, local) 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; + else if (crtscts < 0) + tios.c_cflag &= ~CRTSCTS; tios.c_cflag |= CS8 | CREAD | HUPCL; if (local || !modem) diff --git a/pppd/sys-str.c b/pppd/sys-str.c index aed7c8e..2dc7e96 100644 --- a/pppd/sys-str.c +++ b/pppd/sys-str.c @@ -19,7 +19,7 @@ */ #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 /* @@ -387,9 +387,11 @@ set_up_tty(fd, local) 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; + else if (crtscts < 0) + tios.c_cflag &= ~CRTSCTS; tios.c_cflag |= CS8 | CREAD | HUPCL; if (local || !modem)