linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/2] sink: clean up outstanding AVDTP requests if the stream goes away.
@ 2024-10-25 20:21 Daniel Beer
  2024-10-25 20:21 ` [PATCH BlueZ 2/2] source: " Daniel Beer
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Daniel Beer @ 2024-10-25 20:21 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Daniel Beer

If the stream goes IDLE while we have an outstanding request, connect_id
stays non-zero and is never cleared via a completion callback. As a
consequence, the profile on this device will never be connected
successfully again until BlueZ restarts.
---
 profiles/audio/sink.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c
index a547dcb41..77f195436 100644
--- a/profiles/audio/sink.c
+++ b/profiles/audio/sink.c
@@ -137,6 +137,11 @@ static void stream_state_changed(struct avdtp_stream *stream,
 	case AVDTP_STATE_IDLE:
 		btd_service_disconnecting_complete(sink->service, 0);
 
+		if (sink->connect_id > 0) {
+			a2dp_cancel(sink->connect_id);
+			sink->connect_id = 0;
+		}
+
 		if (sink->disconnect_id > 0) {
 			a2dp_cancel(sink->disconnect_id);
 			sink->disconnect_id = 0;
-- 
2.43.0


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

end of thread, other threads:[~2024-10-28 21:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-25 20:21 [PATCH BlueZ 1/2] sink: clean up outstanding AVDTP requests if the stream goes away Daniel Beer
2024-10-25 20:21 ` [PATCH BlueZ 2/2] source: " Daniel Beer
2024-10-28 15:04   ` Luiz Augusto von Dentz
2024-10-28 17:11     ` Daniel Beer
2024-10-28 17:37       ` Luiz Augusto von Dentz
2024-10-28 20:51         ` Daniel Beer
2024-10-28 20:56           ` Luiz Augusto von Dentz
2024-10-25 22:28 ` [BlueZ,1/2] sink: " bluez.test.bot
2024-10-28 21:00 ` [PATCH BlueZ 1/2] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).