From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v3 1/5] shared/bap: Fix not detaching streams when PAC is removed
Date: Thu, 26 Jan 2023 12:12:38 -0800 [thread overview]
Message-ID: <20230126201242.4110305-1-luiz.dentz@gmail.com> (raw)
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
next reply other threads:[~2023-01-26 20:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-26 20:12 Luiz Augusto von Dentz [this message]
2023-01-26 20:12 ` [PATCH v3 2/5] bap: Fix not setting stream to NULL Luiz Augusto von Dentz
2023-01-26 20:12 ` [PATCH v3 3/5] bap: Fix not removing endpoint if local PAC is unregistered Luiz Augusto von Dentz
2023-01-26 20:12 ` [PATCH v3 4/5] bap: Fix not checking if request fits when grouping Luiz Augusto von Dentz
2023-01-26 20:12 ` [PATCH v3 5/5] bap: Fix registering multiple endpoint for the same PAC set Luiz Augusto von Dentz
2023-01-26 22:26 ` [v3,1/5] shared/bap: Fix not detaching streams when PAC is removed bluez.test.bot
2023-01-27 20:10 ` [PATCH v3 1/5] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230126201242.4110305-1-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox