File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -886,6 +886,8 @@ int bt_iso_chan_get_tx_sync(const struct bt_iso_chan *chan, struct bt_iso_tx_inf
886886#if defined(CONFIG_BT_ISO_UNICAST )
887887int bt_iso_chan_disconnect (struct bt_iso_chan * chan )
888888{
889+ int err ;
890+
889891 CHECKIF (!chan ) {
890892 LOG_DBG ("Invalid parameter: chan %p" , chan );
891893 return - EINVAL ;
@@ -920,7 +922,12 @@ int bt_iso_chan_disconnect(struct bt_iso_chan *chan)
920922 return - EALREADY ;
921923 }
922924
923- return bt_conn_disconnect (chan -> iso , BT_HCI_ERR_REMOTE_USER_TERM_CONN );
925+ err = bt_conn_disconnect (chan -> iso , BT_HCI_ERR_REMOTE_USER_TERM_CONN );
926+ if (err == 0 ) {
927+ bt_iso_chan_set_state (chan , BT_ISO_STATE_DISCONNECTING );
928+ }
929+
930+ return err ;
924931}
925932
926933void bt_iso_cleanup_acl (struct bt_conn * iso )
You can’t perform that action at this time.
0 commit comments