BLE: fixed callback not checking if the event queue exists and executing sometimes after the queue was deleted
This commit is contained in:
parent
bd2a19e2a0
commit
f04b461acb
@ -248,7 +248,11 @@ os_callout_timer_cb(void *ptmr, void *parg)
|
|||||||
struct ble_npl_callout *co;
|
struct ble_npl_callout *co;
|
||||||
co = (struct ble_npl_callout *)parg;
|
co = (struct ble_npl_callout *)parg;
|
||||||
|
|
||||||
if(co->evq) {
|
if(co->evq)
|
||||||
|
{
|
||||||
|
/* In some cases, the event queue g_eventq_dflt is already
|
||||||
|
deleted when this callback is called raising an issue ! */
|
||||||
|
if(co->evq->q)
|
||||||
ble_npl_eventq_put(co->evq, &co->ev);
|
ble_npl_eventq_put(co->evq, &co->ev);
|
||||||
} else {
|
} else {
|
||||||
co->ev.fn(&co->ev);
|
co->ev.fn(&co->ev);
|
||||||
|
Loading…
Reference in New Issue
Block a user