mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-13 02:05:43 +00:00
PPP, added missing pppapi_delete() thread safe function
This commit is contained in:
parent
e9b29184d0
commit
773a2767c7
@ -267,6 +267,27 @@ void pppapi_sighup(ppp_pcb *pcb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call ppp_delete() inside the tcpip_thread context.
|
||||||
|
*/
|
||||||
|
static void pppapi_do_ppp_delete(struct pppapi_msg_msg *msg) {
|
||||||
|
msg->err = ppp_delete(msg->ppp);
|
||||||
|
TCPIP_PPPAPI_ACK(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call ppp_delete() in a thread-safe way by running that function inside the
|
||||||
|
* tcpip_thread context.
|
||||||
|
*/
|
||||||
|
int pppapi_delete(ppp_pcb *pcb) {
|
||||||
|
struct pppapi_msg msg;
|
||||||
|
msg.function = pppapi_do_ppp_delete;
|
||||||
|
msg.msg.ppp = pcb;
|
||||||
|
TCPIP_PPPAPI(&msg);
|
||||||
|
return msg.msg.err;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call ppp_ioctl() inside the tcpip_thread context.
|
* Call ppp_ioctl() inside the tcpip_thread context.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user