lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] PPP pppInputThread Crashing


From: N.Karakotas
Subject: [lwip-users] PPP pppInputThread Crashing
Date: Sat, 25 Feb 2012 17:23:44 +0200

Hello,
 
After having some problems with the PPP authenticating due to handshaking I discovered a new problem. Every time I closed a PPP connection the FreeRTOS stack crashed.
I was able to find the root of the problem. When not running the pppOverSerialOpen on a thread and pppClose is called in the pppInputThread a crash is caused:
 

while (lcp_phase[pcrx->pd] != PHASE_DEAD) {

count = sio_read(pcrx->fd, pcrx->rxbuf, PPPOS_RX_BUFSIZE);

if(count > 0) {

pppInProc(pcrx, pcrx->rxbuf, count);

} else {

/* nothing received, give other tasks a chance to run */

sys_msleep(1);

}

}

 

The while loop is exited and causes a crash. In order to solve it I added the end the following code:

/* Remove the running thread or else it will exit the while loop and crash */

sys_arch_thread_remove(pppInputTh);

 

This is just as reference to anyone that may come to this problem in the future. I don’t think it’s a bug. What do you people think?

Regards,

Nick

 

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]