From dbb7c00aa59d3d6865ec5e41197fecd4c8c02d17 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Wed, 21 Oct 2020 01:43:57 +0200 Subject: [PATCH] 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. --- src/netif/ppp/ppp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index fef080fc..27078f30 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -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); }