All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] shared/bap: Fix not detaching streams when PAC is removed
@ 2023-01-24 23:59 Luiz Augusto von Dentz
  2023-01-24 23:59 ` [PATCH v2 2/3] bap: Fix not setting stream to NULL Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2023-01-24 23:59 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

When local PAC is removed we attempt to release the streams but we left
it still attached to the endpoint, so this makes sure the stream is
properly detached by setting its state to idle.

Fixes: https://github.com/bluez/bluez/issues/457
---
 src/shared/bap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index db7def7999b7..4ba65cbaa8f9 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2478,8 +2478,10 @@ static void remove_streams(void *data, void *user_data)
 	struct bt_bap_stream *stream;
 
 	stream = queue_remove_if(bap->streams, match_stream_lpac, pac);
-	if (stream)
+	if (stream) {
 		bt_bap_stream_release(stream, NULL, NULL);
+		stream_set_state(stream, BT_BAP_STREAM_STATE_IDLE);
+	}
 }
 
 bool bt_bap_remove_pac(struct bt_bap_pac *pac)
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-25  2:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 23:59 [PATCH v2 1/3] shared/bap: Fix not detaching streams when PAC is removed Luiz Augusto von Dentz
2023-01-24 23:59 ` [PATCH v2 2/3] bap: Fix not setting stream to NULL Luiz Augusto von Dentz
2023-01-24 23:59 ` [PATCH v2 3/3] bap: Fix not removing endpoint if local PAC is unregistered Luiz Augusto von Dentz
2023-01-25  2:37 ` [v2,1/3] shared/bap: Fix not detaching streams when PAC is removed bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.