Skip to content

Commit

Permalink
nimble/host: Fix invalid connection handle check in SM
Browse files Browse the repository at this point in the history
This fixes invalid conn handle check in SM. The handle 0 is valid
connection handle.
  • Loading branch information
MariuszSkamra authored and andrzej-kaczmarek committed May 15, 2024
1 parent 5f2aa28 commit 8bdd23e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nimble/host/src/ble_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2873,7 +2873,7 @@ ble_sm_rx(struct ble_l2cap_chan *chan)
int rc;

handle = ble_l2cap_get_conn_handle(chan);
if (!handle) {
if (handle == BLE_HS_CONN_HANDLE_NONE) {
return BLE_HS_ENOTCONN;
}

Expand Down

0 comments on commit 8bdd23e

Please sign in to comment.