From cfb233b4c6b3020627014a4fffbfe16e2db8e891 Mon Sep 17 00:00:00 2001 From: Iulia Tanasescu Date: Thu, 20 Feb 2025 10:58:10 +0200 Subject: [PATCH] bap: Do not set adapter as bt_bap user_data In case of a BAP Broadcast Source session, it is not necessary to set the adapter as bt_bap user data. Plus, setting it makes it confusing for plugins to know the type of pointer to parse, distinguishing between Broadcast Source sessions and other types of sessions that hold a service reference as user data. For a BAP Broadcast Source, the bt_bap user data can remain unset, since the session is not associated with any remote device/service. --- profiles/audio/bap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index 6d2afa2c0..b36e45ea4 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -3280,7 +3280,6 @@ static int bap_adapter_probe(struct btd_profile *p, struct btd_adapter *adapter) data->pac_id = bt_bap_pac_register(data->bap, pac_added_broadcast, pac_removed_broadcast, data, NULL); - bt_bap_set_user_data(data->bap, adapter); bap_data_set_user_data(data, adapter); data->adapter = adapter; -- 2.47.3