This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 07b0b0da8 nimble/host: Fix unexpected assertion
07b0b0da8 is described below
commit 07b0b0da8d2fe00f1866f208a51c6be2c12efc68
Author: Mariusz Skamra <[email protected]>
AuthorDate: Wed Feb 25 16:31:07 2026 +0100
nimble/host: Fix unexpected assertion
This fixes unexpected assertion that happens before mutex lock.
The caller shall wait on mutex instead, when ack is pending.
---
nimble/host/src/ble_hs_hci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nimble/host/src/ble_hs_hci.c b/nimble/host/src/ble_hs_hci.c
index e3fe335f5..e53e4b73b 100644
--- a/nimble/host/src/ble_hs_hci.c
+++ b/nimble/host/src/ble_hs_hci.c
@@ -313,8 +313,8 @@ ble_hs_hci_cmd_tx(uint16_t opcode, const void *cmd, uint8_t
cmd_len,
struct ble_hs_hci_ack ack;
int rc;
- BLE_HS_DBG_ASSERT(ble_hs_hci_ack == NULL);
ble_hs_hci_lock();
+ BLE_HS_DBG_ASSERT(ble_hs_hci_ack == NULL);
rc = ble_hs_hci_cmd_send_buf(opcode, cmd, cmd_len);
if (rc != 0) {