X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-str.c;h=2dc7e968928f1571a216a2867d58c92ecfd03281;hp=e34d54779c6c5e361334e2b75251534e59bb1996;hb=db24ed59a91b79aae2570f9b89f33406f22051bc;hpb=19f8889c4e8a9db53619288b5c69f0f7ab4d4159 diff --git a/pppd/sys-str.c b/pppd/sys-str.c index e34d547..2dc7e96 100644 --- a/pppd/sys-str.c +++ b/pppd/sys-str.c @@ -18,6 +18,10 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#ifndef lint +static char rcsid[] = "$Id: sys-str.c,v 1.13 1994/09/16 02:35:42 paulus Exp $"; +#endif + /* * TODO: */ @@ -383,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) @@ -653,6 +659,24 @@ ccp_flags_set(unit, isopen, isup) syslog(LOG_ERR, "ioctl (SIOCSIFCOMP): %m"); } +/* + * ccp_fatal_error - returns 1 if decompression was disabled as a + * result of an error detected after decompression of a packet, + * 0 otherwise. This is necessary because of patent nonsense. + */ +int +ccp_fatal_error(unit) + int unit; +{ + int x; + + if (ioctl(fd, SIOCGIFCOMP, (caddr_t) &x) < 0) { + syslog(LOG_ERR, "ioctl(SIOCGIFCOMP): %m"); + return 0; + } + return x & CCP_FATALERROR; +} + /* * sifvjcomp - config tcp header compression */