Skip to content

Commit

Permalink
ble(fix): Fixed crash issue when reset event queue
Browse files Browse the repository at this point in the history
  • Loading branch information
luomanruo committed Dec 19, 2023
1 parent 96a3926 commit 5c72943
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/bt/porting/npl/freertos/src/npl_os_freertos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5c72943

Please sign in to comment.