Commit 0eb4bfee authored by Luiz Augusto von Dentz's avatar Luiz Augusto von Dentz Committed by Anas Nashif
Browse files

Bluetooth: ISO: Fix not unbind if ACL has been disconnected



If ACL has been disconnected any ISO handle shall be considered invalid
as well.

Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent b5a46db6
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -777,8 +777,9 @@ static void bt_iso_chan_disconnected(struct bt_iso_chan *chan)

	bt_iso_chan_set_state(chan, BT_ISO_BOUND);

	/* Unbind if acting as slave */
	if (chan->conn->role == BT_HCI_ROLE_SLAVE) {
	/* Unbind if acting as slave or ACL has been disconnected */
	if (chan->conn->role == BT_HCI_ROLE_SLAVE ||
	    chan->conn->iso.acl->state == BT_CONN_DISCONNECTED) {
		bt_iso_chan_unbind(chan);
	}