nimble/host: Fix semaphore usage

We should not access semaphore internals. Instead, use dedicated API.

X-Original-Commit: b226920419ca7a84f24ac56f76ca5f52e79a584a
This commit is contained in:
Andrzej Kaczmarek
2017-11-09 15:41:52 +01:00
parent 4e3559a47c
commit 227f2ec527
+1 -1
View File
@@ -338,7 +338,7 @@ ble_hs_hci_cmd_tx_empty_ack(uint16_t opcode, void *cmd, uint8_t cmd_len)
void
ble_hs_hci_rx_ack(uint8_t *ack_ev)
{
if (ble_hs_hci_sem.sem_tokens != 0) {
if (os_sem_get_count(&ble_hs_hci_sem) > 0) {
/* This ack is unexpected; ignore it. */
ble_hci_trans_buf_free(ack_ev);
return;