X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsys-bsd.c;h=4239d0fc8dc2628f0dfda3b2cfd85e585eb77a19;hb=24af3d4d6dbf452f8acaa1a15a9e08f96a0e6eb2;hp=12bbdde79ea41d27c6aeb6f2305646a10f48823c;hpb=2d429b67dec287282cad25de7f04fd251be86c3a;p=ppp.git diff --git a/pppd/sys-bsd.c b/pppd/sys-bsd.c index 12bbdde..4239d0f 100644 --- a/pppd/sys-bsd.c +++ b/pppd/sys-bsd.c @@ -21,7 +21,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-bsd.c,v 1.32 1998/09/02 20:58:13 christos Exp $"; +static char rcsid[] = "$Id: sys-bsd.c,v 1.34 1998/11/07 06:59:30 paulus Exp $"; /* $NetBSD: sys-bsd.c,v 1.1.1.3 1997/09/26 18:53:04 christos Exp $ */ #endif @@ -159,9 +159,16 @@ sys_close() /* * sys_check_options - check the options that the user specified */ -void +int sys_check_options() { +#ifndef CDTRCTS + if (crtscts == 2) { + syslog(LOG_WARNING, "DTR/CTS flow control is not supported on this system"); + return 0; + } +#endif + return 1; } /* @@ -385,10 +392,19 @@ set_up_tty(fd, local) } tios.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CLOCAL); - if (crtscts > 0 && !local) - tios.c_cflag |= CRTSCTS; - else if (crtscts < 0) + if (crtscts > 0 && !local) { + if (crtscts == 2) { +#ifdef CDTRCTS + tios.c_cflag |= CDTRCTS; +#endif + } else + tios.c_cflag |= CRTSCTS; + } else if (crtscts < 0) { tios.c_cflag &= ~CRTSCTS; +#ifdef CDTRCTS + tios.c_cflag &= ~CDTRCTS; +#endif + } tios.c_cflag |= CS8 | CREAD | HUPCL; if (local || !modem)