|
From: | Greg Smith |
Subject: | [lwip-users] PPP as Server Disconnect/Reconnect Problem Under 2.0.0 Beta1 |
Date: | Wed, 18 May 2016 16:23:28 +0000 |
Hi, all. I am running my target in PPP(oS) Server Mode with lwIP version 2.0.0 Beta1. When the other peer disconnects (by sending an LCP TermReq packet), an LCP TermAck is sent which allows the peer to disconnect gracefully. However, instead of
then immediately closing the connection, lwIP waits to time out and then sets its error code to
PPPERR_CONNECT. While the timeout may be by design, I would expect the error code to be set to
PPPERR_USER. But I'm not clear if
PPPERR_USER is only for cases where my own application ends the connection or not. Can someone clarify this? Additionally, and this is the important part, I want to resume listening for a new connection. So I call
pppapi_listen() again at the end of my link status callback function (which happens to look
a lot like Sylvain's example in ppp.txt :-) ). pppapi_listen() eventually gets as far as
sys_arch_sem_wait(TCPIP_MSG_VAR_REF(msg).msg.api_call.sem, 0); in
tcpip_api_call() (in tcpip.c) and then waits indefinitely for that semaphore.
Is this a bug? Or is there another call(s) I need to make first? I'd prefer to not have to completely kill/free the existing PPP PCB to continue to listen for the next connection request. Thank you for your help. -- G This email has been scanned for email related threats and delivered safely by Mimecast. For more information please visit http://www.mimecast.com |
[Prev in Thread] | Current Thread | [Next in Thread] |