PPP: add LWIP_ASSERT_CORE_LOCKED to ppp_set_notify_phase_callback

This function call the notify phase callback that should be called from
the lwIP core thread. This is especially true if the user callback
is not designed to be reentrant.
This commit is contained in:
Sylvain Rochet 2020-10-21 01:43:57 +02:00
parent c18a8dc9cc
commit dbb7c00aa5

View File

@ -251,6 +251,7 @@ void ppp_set_mppe(ppp_pcb *pcb, u8_t flags) {
#if PPP_NOTIFY_PHASE
void ppp_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_phase_cb) {
LWIP_ASSERT_CORE_LOCKED();
pcb->notify_phase_cb = notify_phase_cb;
notify_phase_cb(pcb, pcb->phase, pcb->ctx_cb);
}