[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] PPP new Stack
From: |
Nikolas Karakotas |
Subject: |
Re: [lwip-users] PPP new Stack |
Date: |
Tue, 19 Feb 2013 14:55:27 +1100 |
Hi Sylvain,
Ok I think I found the problem. I use PPP_INPROC_OWNTHREAD and once I added
ppp_delete() to the end it seems to fix the problem.
I also removed the ppp_delete from the linkStatusCB. Somehow a clean up wasn’t
completed and a pbuf was always allocated but not freed as you can here:
ppp_link_terminated: unit 2: link_status_cb=0xe15 err_code=5
PPP Error=5
ppp_delete: unit 2
netif: setting default interface ''
netif_remove: removed netif
ppp_link_terminated: finished.
pbuf_free(0x1000255c)
pbuf_free: deallocating 0x1000255c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x1000255c <---- here
pbuf_alloc(length=0) == 0x1000255c
Delete pppos_input_thread
Below is my proc.
#if !PPP_INPROC_OWNTHREAD
/* Define this process here as we need to delete the task when the
connections ends */
static void pppos_input_thread( void *arg ){
int count;
ppp_pcb_rx *pcrx = (ppp_pcb_rx*)arg;
ppp_pcb *pcb = (ppp_pcb*)pcrx->pcb;
memset(rxbuf,0,PPPOS_RX_BUFSIZE);
while (pcb->phase != PHASE_DEAD) {
count = sio_read(pcrx->fd, rxbuf, PPPOS_RX_BUFSIZE);
if(count > 0) {
pppos_input(pcb, rxbuf, count);
}else {
/* nothing received, give other tasks a chance to run */
sys_msleep(1);
}
}
ppp_delete(pcb);
puts("Delete pppos_input_thread\n");
vTaskDelete(NULL);
}
#endif
-----Original Message-----
From: Sylvain Rochet
Sent: Tuesday, February 19, 2013 9:23 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] PPP new Stack
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
- [lwip-users] PPP new Stack, Nikolas Karakotas, 2013/02/18
- Re: [lwip-users] PPP new Stack, Sylvain Rochet, 2013/02/18
- Re: [lwip-users] PPP new Stack, Nikolas Karakotas, 2013/02/18
- Re: [lwip-users] PPP new Stack,
Nikolas Karakotas <=
- Re: [lwip-users] PPP new Stack, Sylvain Rochet, 2013/02/19
- Re: [lwip-users] PPP new Stack, Nikolas Karakotas, 2013/02/19
- Re: [lwip-users] PPP new Stack, Nikolas Karakotas, 2013/02/20
- Re: [lwip-users] PPP new Stack, Sylvain Rochet, 2013/02/27
- [lwip-users] Firewall, Chris Williams, 2013/02/28