From 5c729436d6d92c94953abfaaa3d40052c8219cd8 Mon Sep 17 00:00:00 2001 From: luomanruo Date: Wed, 6 Dec 2023 14:13:23 +0800 Subject: [PATCH] ble(fix): Fixed crash issue when reset event queue --- components/bt/porting/npl/freertos/src/npl_os_freertos.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/bt/porting/npl/freertos/src/npl_os_freertos.c b/components/bt/porting/npl/freertos/src/npl_os_freertos.c index dc7f5af18a14..ebf89d3cdd53 100644 --- a/components/bt/porting/npl/freertos/src/npl_os_freertos.c +++ b/components/bt/porting/npl/freertos/src/npl_os_freertos.c @@ -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