Skip to content

Commit b47a92d

Browse files
Thalleyrlubos
authored andcommitted
[nrf fromtree] Bluetooth: BAP: Fix bad check for ASE state for CIS connect
A CIS may be connected in either the QoS Configured state or the enabling state. The QoS Configured state is the earliest state it is allowed, due to it being the first state where the CIS_ID and ASE_ID are paired. The enabling state is the "last" state it is allowed, as if the ASE is in the streaming, disabling or releasing state we should not allow/expect a CIS connection to happen. Signed-off-by: Emil Gydesen <[email protected]> (cherry picked from commit 4c54eef)
1 parent b866b8b commit b47a92d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subsys/bluetooth/audio/bap_unicast_client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ static void unicast_client_ep_iso_connected(struct bt_bap_ep *ep)
327327
ep->unicast_group->has_been_connected = true;
328328
}
329329

330-
if (ep->state != BT_BAP_EP_STATE_ENABLING) {
331-
LOG_DBG("endpoint not in enabling state: %s", bt_bap_ep_state_str(ep->state));
330+
if (ep->state != BT_BAP_EP_STATE_QOS_CONFIGURED && ep->state != BT_BAP_EP_STATE_ENABLING) {
331+
LOG_DBG("endpoint in invalid state: %s", bt_bap_ep_state_str(ep->state));
332332
return;
333333
}
334334

0 commit comments

Comments
 (0)