From c00ffff3c774b65789e659afda9a74a6fc15e0e6 Mon Sep 17 00:00:00 2001 From: Piotr Narajowski Date: Tue, 19 Aug 2025 13:40:39 +0200 Subject: [PATCH] nimble/host: fix ble_svc_gatt_cl_sup_feat_access Fix ble_svc_gatt_cl_sup_feat_access. If an error occured while client writes to client supported features only BLE_ATT_ERR_UNLIKELY was returned. --- nimble/host/services/gatt/src/ble_svc_gatt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nimble/host/services/gatt/src/ble_svc_gatt.c b/nimble/host/services/gatt/src/ble_svc_gatt.c index 91abf9ad65..331d6bedd8 100644 --- a/nimble/host/services/gatt/src/ble_svc_gatt.c +++ b/nimble/host/services/gatt/src/ble_svc_gatt.c @@ -113,8 +113,9 @@ ble_svc_gatt_cl_sup_feat_access(uint16_t conn_handle, uint16_t attr_handle, return 0; } if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR) { - if (ble_gatts_peer_cl_sup_feat_update(conn_handle, ctxt->om)) { - return BLE_ATT_ERR_UNLIKELY; + rc = ble_gatts_peer_cl_sup_feat_update(conn_handle, ctxt->om); + if (rc != 0) { + return rc; } }