Commit 1280f432 authored by Emil Gydesen's avatar Emil Gydesen Committed by Benjamin Cabé
Browse files

Bluetooth: ASCS: Missing cleanup of stream for idle state



When the stream enters the idle state, some values were not
properly reset (e.g. the stream->ep).

Use the bt_bap_stream_detach function to clean up the stream.

Signed-off-by: default avatarEmil Gydesen <emil.gydesen@nordicsemi.no>
parent c858c8d6
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -318,10 +318,7 @@ static void ase_enter_state_idle(struct bt_ascs_ase *ase)

	ase->ep.receiver_ready = false;

	if (stream->conn != NULL) {
		bt_conn_unref(stream->conn);
		stream->conn = NULL;
	}
	bt_bap_stream_detach(stream);

	ops = stream->ops;
	if (ops != NULL && ops->released != NULL) {