[PATCH BlueZ 1/3] bap: Do not clear user_data before detaching bt_bap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux