From 253502d311bf1858af2aeb90d5996167f1da9bf3 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 7 Dec 2022 13:49:24 -0800 Subject: shared/bap: Make bt_bap_pac_register to be per session This makes bt_bap_pac_register to be per session rather than global so the callback don't have to match the session by itself. --- profiles/audio/bap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'profiles') diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index f28843ae6..ae944b617 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -120,7 +120,7 @@ static void bap_data_free(struct bap_data *data) queue_destroy(data->streams, NULL); bt_bap_ready_unregister(data->bap, data->ready_id); bt_bap_state_unregister(data->bap, data->state_id); - bt_bap_pac_unregister(data->pac_id); + bt_bap_pac_unregister(data->bap, data->pac_id); bt_bap_unref(data->bap); free(data); } @@ -1265,8 +1265,8 @@ static int bap_probe(struct btd_service *service) NULL); data->state_id = bt_bap_state_register(data->bap, bap_state, bap_connecting, data, NULL); - data->pac_id = bt_bap_pac_register(pac_added, pac_removed, service, - NULL); + data->pac_id = bt_bap_pac_register(data->bap, pac_added, pac_removed, + service, NULL); bt_bap_set_user_data(data->bap, service); -- cgit v1.2.1