From 86fd74b8e887f1d2eb29aa950b18d0ed1c67a43b Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Wed, 2 Apr 2025 21:28:11 +0530 Subject: [PATCH] fix(nimble): Handle connection posting condition Current code depends only on success of read remote features to post connection event. Made a fix to separate the two. Failure in status event for LMP features list still implies connection has been created. --- nimble/host/src/ble_gap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index 3702627cb..e8b00e2fe 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -2610,6 +2610,9 @@ ble_gap_rx_rd_rem_sup_feat_complete(const struct ble_hci_ev_le_subev_rd_rem_used } else { if ((conn != NULL) && (ev->status == 0)) { conn->supported_feat = get_le32(ev->features); + } + + if (conn != NULL) { ble_gap_event_connect_call(ev->conn_handle, ev->status); slave_conn[ev->conn_handle] = 1; }