ble(fix): Fixed crash issue when reset event queue

This commit is contained in:
luomanruo 2023-12-06 14:13:23 +08:00
parent bf44a9e9c6
commit ca4f9ccedb

View File

@ -134,6 +134,7 @@ npl_freertos_eventq_init(struct ble_npl_eventq *evq)
eventq->q = xQueueCreate(ble_freertos_total_event_cnt, sizeof(struct ble_npl_eventq *));
BLE_LL_ASSERT(eventq->q);
} else {
eventq = (struct ble_npl_eventq_freertos*)evq->eventq;
xQueueReset(eventq->q);
}
#else
@ -145,6 +146,7 @@ npl_freertos_eventq_init(struct ble_npl_eventq *evq)
eventq->q = xQueueCreate(ble_freertos_total_event_cnt, sizeof(struct ble_npl_eventq *));
BLE_LL_ASSERT(eventq->q);
} else {
eventq = (struct ble_npl_eventq_freertos*)evq->eventq;
xQueueReset(eventq->q);
}
#endif