PPP: removed ppp_delete(), merged with ppp_free()

The only benefit of ppp_delete() call was about having a persistent
netif interface. netif was moved out of PPP pcb so we don't need
ppp_delete() anymore, second step in simplifying the weird
new/open/free/delete PPP API.
This commit is contained in:
Sylvain Rochet
2015-02-14 22:22:08 +01:00
parent 318e752fd6
commit 17c6be6a9b
4 changed files with 13 additions and 56 deletions

View File

@@ -308,24 +308,24 @@ pppapi_sighup(ppp_pcb *pcb)
/**
* Call ppp_delete() inside the tcpip_thread context.
* Call ppp_free() inside the tcpip_thread context.
*/
static void
pppapi_do_ppp_delete(struct pppapi_msg_msg *msg)
pppapi_do_ppp_free(struct pppapi_msg_msg *msg)
{
msg->err = ppp_delete(msg->ppp);
msg->err = ppp_free(msg->ppp);
TCPIP_PPPAPI_ACK(msg);
}
/**
* Call ppp_delete() in a thread-safe way by running that function inside the
* Call ppp_free() in a thread-safe way by running that function inside the
* tcpip_thread context.
*/
int
pppapi_delete(ppp_pcb *pcb)
pppapi_free(ppp_pcb *pcb)
{
struct pppapi_msg msg;
msg.function = pppapi_do_ppp_delete;
msg.function = pppapi_do_ppp_free;
msg.msg.ppp = pcb;
TCPIP_PPPAPI(&msg);
return msg.msg.err;