From c07aa0c56e1eea8155cd6a49f7b2f1afb602c6ba Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 30 Jan 2004 14:50:20 +0000 Subject: 2004-01-30 Wilfried Busalski PR pppd/564 * libnetworking/net/if_ppp.c, libnetworking/net/if_pppvar.h, libnetworking/net/ppp_tty.c: ppp0 Interface lose packets if the system use a slow baudrate for the modem or the tcp/ip-packet is fragmented. --- cpukit/libnetworking/net/ppp_tty.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'cpukit/libnetworking/net/ppp_tty.c') diff --git a/cpukit/libnetworking/net/ppp_tty.c b/cpukit/libnetworking/net/ppp_tty.c index 060bd3976c..45e21362b3 100644 --- a/cpukit/libnetworking/net/ppp_tty.c +++ b/cpukit/libnetworking/net/ppp_tty.c @@ -570,6 +570,14 @@ pppstart(struct rtems_termios_tty *tp) /* ensure input is valid and we are busy */ if (( sc != NULL ) && ( sc->sc_outflag & SC_TX_BUSY )) { /* check to see if we need to get the next buffer */ + + /* Ready with PPP_FLAG Character ? */ + if(sc->sc_outflag & SC_TX_LASTCHAR){ + sc->sc_outflag &= ~(SC_TX_BUSY | SC_TX_FCS | SC_TX_LASTCHAR); + rtems_event_send(sc->sc_txtask, TX_TRANSMIT); /* Ready for the next Packet */ + return(0); + } + if ( sc->sc_outoff >= sc->sc_outlen ) { /* loop to get next non-zero length buffer */ if ( sc->sc_outmc != NULL ) { @@ -593,10 +601,11 @@ pppstart(struct rtems_termios_tty *tp) } else { /* done with this packet */ - sc->sc_outflag &= ~SC_TX_BUSY; - sc->sc_outchar = (u_char)PPP_FLAG; + sc->sc_outflag |= SC_TX_LASTCHAR; + sc->sc_outflag &=~(SC_TX_FCS); + sc->sc_outchar = (u_char)PPP_FLAG; (*tp->device.write)(tp->minor, &sc->sc_outchar, 1); - rtems_event_send(sc->sc_txtask, TX_TRANSMIT); + return(0); } } -- cgit v1.2.3