mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-11-02 02:22:47 +00:00
fix(nimble): free eatt event when eventq is full
This commit is contained in:
@@ -487,6 +487,11 @@ ble_gatt_eatt_read_uuid_cb(uint16_t conn_handle,
|
||||
if (ev) {
|
||||
ble_npl_event_init(ev, ble_gatt_eatt_read_cl_uuid, (void *)((uintptr_t) conn_handle));
|
||||
ble_npl_eventq_put(ble_hs_evq_get(), ev);
|
||||
if (!ble_npl_event_is_queued(ev)) {
|
||||
BLE_EATT_LOG_ERROR("eatt: eventq full, drop client supported feature read\n");
|
||||
ble_npl_event_deinit(ev);
|
||||
nimble_platform_mem_free(ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -548,6 +553,11 @@ ble_eatt_gap_event(struct ble_gap_event *event, void *arg)
|
||||
if (ev) {
|
||||
ble_npl_event_init(ev, ble_gatt_eatt_read_svr_uuid, (void *)((uintptr_t)(event->enc_change.conn_handle)));
|
||||
ble_npl_eventq_put(ble_hs_evq_get(), ev);
|
||||
if (!ble_npl_event_is_queued(ev)) {
|
||||
BLE_EATT_LOG_ERROR("eatt: eventq full, drop server supported feature read\n");
|
||||
ble_npl_event_deinit(ev);
|
||||
nimble_platform_mem_free(ev);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user