[rtems commit] ppp: Nothing to transmit hint for Termios driver

Sebastian Huber sebh at rtems.org
Wed Oct 8 05:36:11 UTC 2014


Module:    rtems
Branch:    master
Commit:    77dd9a4f8a5ef1c6c0356aa8e10bdae46997681b
Changeset: http://git.rtems.org/rtems/commit/?id=77dd9a4f8a5ef1c6c0356aa8e10bdae46997681b

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Oct  7 16:25:43 2014 +0200

ppp: Nothing to transmit hint for Termios driver

---

 cpukit/libnetworking/net/ppp_tty.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/cpukit/libnetworking/net/ppp_tty.c b/cpukit/libnetworking/net/ppp_tty.c
index 85a336c..1051048 100644
--- a/cpukit/libnetworking/net/ppp_tty.c
+++ b/cpukit/libnetworking/net/ppp_tty.c
@@ -577,6 +577,10 @@ pppstart(struct rtems_termios_tty *tp)
     /* Ready with PPP_FLAG Character ? */
     if(sc->sc_outflag & SC_TX_LASTCHAR){
         sc->sc_outflag &= ~(SC_TX_BUSY | SC_TX_FCS | SC_TX_LASTCHAR);
+
+        /* Notify driver that we have nothing to transmit */
+        (*tp->handler.write)(ctx, NULL, 0);
+
         rtems_event_send(sc->sc_txtask, TX_TRANSMIT);	/* Ready for the next Packet */
         return(0);
     }
@@ -647,10 +651,15 @@ pppstart(struct rtems_termios_tty *tp)
       (*tp->handler.write)(ctx, (char *)sendBegin, (ioffset > 0) ? ioffset : 1);
       sc->sc_stats.ppp_obytes += (ioffset > 0) ? ioffset : 1;
       sc->sc_outoff += ioffset;
+
+      return (0);
     }
   }
 
-  return ( 0 );
+  /* Notify driver that we have nothing to transmit */
+  (*tp->handler.write)(ctx, NULL, 0);
+
+  return (0);
 }
 
 #ifdef XXX_XXX



More information about the vc mailing list