2002-03-27 Ilya Alexeev <ilya@continuum.ru>

* PR162
        * net/if_ppp.c ppp_txdaemon(), net/if_pppvar.h pppstart(): Local
	variables must not be used in a device write routines.  Now
	ppp_softc structure have own character for writing to device
	(sc_outchar).  I think that converting local variables to static
	is not a right solution, because problems will occur in the case
	of two or more ppp instances.
	* net/ppp_tty.c pppstart(): Type of the ioffset variable must be
	u_long, otherwise in the case of the big output packet endless
	loop may occur.
This commit is contained in:
Joel Sherrill
2002-03-27 14:36:07 +00:00
parent 90f30c8c14
commit f4c118d7a3
12 changed files with 78 additions and 39 deletions

View File

@@ -243,7 +243,6 @@ static rtems_task ppp_rxdaemon(rtems_task_argument arg)
static rtems_task ppp_txdaemon(rtems_task_argument arg)
{
rtems_event_set events;
char cFrame = (char )PPP_FLAG;
int iprocess = (int )0;
struct ppp_softc *sc = (struct ppp_softc *)arg;
struct mbuf *mp;
@@ -351,7 +350,8 @@ static rtems_task ppp_txdaemon(rtems_task_argument arg)
microtime(&sc->sc_if.if_lastchange);
/* write out frame byte to start the transmission */
(*tp->device.write)(tp->minor, &cFrame, 1);
sc->sc_outchar = (u_char)PPP_FLAG;
(*tp->device.write)(tp->minor, &sc->sc_outchar, 1);
}
/* check to see if we need to free some empty mbufs */