summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking/net/ppp_tty.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2004-01-30 14:50:20 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2004-01-30 14:50:20 +0000
commitc07aa0c56e1eea8155cd6a49f7b2f1afb602c6ba (patch)
treee04538bf2734b30529113f46d99576c1062501fe /cpukit/libnetworking/net/ppp_tty.c
parent2004-01-30 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-c07aa0c56e1eea8155cd6a49f7b2f1afb602c6ba.tar.bz2
2004-01-30 Wilfried Busalski <w.busalski@lancier-monitoring.de>
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.
Diffstat (limited to 'cpukit/libnetworking/net/ppp_tty.c')
-rw-r--r--cpukit/libnetworking/net/ppp_tty.c15
1 files changed, 12 insertions, 3 deletions
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);
}
}