Bluetooth: ISO: Fixes ISO central disconnect and cleanup issues

When an ISO channel is disconnect on the central, it is
not deallocated, but merely disconnected. This is because,
as per the HCI spec, the CIS handle lives on in the CIG.

Instead of unref'ing the bt_conn to 0, we simply put the
channel and connection in the disconnected state.

This also fixes a few missing returns for
terminating a CIG.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2021-08-25 18:25:46 +02:00 committed by Anas Nashif
commit 5d14cddaa8
3 changed files with 21 additions and 28 deletions

View file

@ -83,8 +83,6 @@ struct bt_iso_chan;
enum {
/** Channel disconnected */
BT_ISO_DISCONNECTED,
/** Channel bound to a connection */
BT_ISO_BOUND,
/** Channel in connecting state */
BT_ISO_CONNECT,
/** Channel ready for upper layer traffic on it */