From: Iulia Tanasescu <iulia.tanasescu@nxp.com>
To: linux-bluetooth@vger.kernel.org
Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com,
andrei.istodorescu@nxp.com, luiz.dentz@gmail.com,
Iulia Tanasescu <iulia.tanasescu@nxp.com>
Subject: [PATCH BlueZ 1/3] bap: Do not clear user_data before detaching bt_bap
Date: Thu, 20 Feb 2025 10:58:09 +0200 [thread overview]
Message-ID: <20250220085811.5033-2-iulia.tanasescu@nxp.com> (raw)
In-Reply-To: <20250220085811.5033-1-iulia.tanasescu@nxp.com>
After detaching a bt_bap session, each plugin that registered a bap
detached callback will be notified. The bt_bap user data should be
set when calling these callbacks, so the bt_bap session can be
matched to the associated service and the cleanup is handled
accordingly.
---
profiles/audio/bap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index c503f250c..6d2afa2c0 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -192,10 +192,8 @@ static void bap_data_free(struct bap_data *data)
if (data->io_id)
g_source_remove(data->io_id);
- if (data->service && btd_service_get_user_data(data->service) == data) {
+ if (data->service && btd_service_get_user_data(data->service) == data)
btd_service_set_user_data(data->service, NULL);
- bt_bap_set_user_data(data->bap, NULL);
- }
queue_destroy(data->snks, ep_unregister);
queue_destroy(data->srcs, ep_unregister);
--
2.43.0
next prev parent reply other threads:[~2025-02-20 8:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 8:58 [PATCH BlueZ 0/3] bap: Update bt_bap user data handling Iulia Tanasescu
2025-02-20 8:58 ` Iulia Tanasescu [this message]
2025-02-20 10:11 ` bluez.test.bot
2025-02-20 8:58 ` [PATCH BlueZ 2/3] bap: Do not set adapter as bt_bap user_data Iulia Tanasescu
2025-02-20 8:58 ` [PATCH BlueZ 3/3] bass: Add checks for bap user data Iulia Tanasescu
2025-02-21 16:50 ` [PATCH BlueZ 0/3] bap: Update bt_bap user data handling 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=20250220085811.5033-2-iulia.tanasescu@nxp.com \
--to=iulia.tanasescu@nxp.com \
--cc=andrei.istodorescu@nxp.com \
--cc=claudia.rosu@nxp.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=mihai-octavian.urzica@nxp.com \
/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 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.