From: Paul Mackerras Date: Thu, 12 Aug 1999 04:24:52 +0000 (+0000) Subject: sync support X-Git-Tag: ppp-2.4.7~667 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=9678d851692fcd46e92f472d7486bbd3c8be24c1 sync support --- diff --git a/pppd/sys-svr4.c b/pppd/sys-svr4.c index 64ad5f9..236d825 100644 --- a/pppd/sys-svr4.c +++ b/pppd/sys-svr4.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-svr4.c,v 1.31 1999/06/24 00:18:41 paulus Exp $"; +static const char rcsid[] = "$Id: sys-svr4.c,v 1.32 1999/08/12 04:24:52 paulus Exp $"; #endif #include @@ -280,11 +280,14 @@ establish_ppp(fd) /* Push the async hdlc module and the compressor module. */ tty_npushed = 0; - if (ioctl(fd, I_PUSH, "ppp_ahdl") < 0) { - error("Couldn't push PPP Async HDLC module: %m"); - return -1; + + if(!sync_serial) { + if (ioctl(fd, I_PUSH, "ppp_ahdl") < 0) { + error("Couldn't push PPP Async HDLC module: %m"); + return -1; + } + ++tty_npushed; } - ++tty_npushed; if (kdebugflag & 4) { i = PPPDBG_LOG + PPPDBG_AHDLC; strioctl(pppfd, PPPIO_DEBUG, &i, sizeof(int), 0); @@ -515,7 +518,7 @@ set_up_tty(fd, local) struct termiox tiox; #endif - if (tcgetattr(fd, &tios) < 0) + if (!sync_serial && tcgetattr(fd, &tios) < 0) fatal("tcgetattr: %m"); #ifndef CRTSCTS @@ -580,7 +583,7 @@ set_up_tty(fd, local) fatal("Baud rate for %s is 0; need explicit baud rate", devnam); } - if (tcsetattr(fd, TCSAFLUSH, &tios) < 0) + if (!sync_serial && tcsetattr(fd, TCSAFLUSH, &tios) < 0) fatal("tcsetattr: %m"); #ifndef CRTSCTS