diff mbox series

[BlueZ,1/1] bap: Set bap debug func at broadcast probe

Message ID 20240919082046.7208-2-iulia.tanasescu@nxp.com
State New
Headers show
Series bap: Set bap debug func at broadcast probe | expand

Commit Message

Iulia Tanasescu Sept. 19, 2024, 8:20 a.m. UTC
When a Broadcast Sink acting as a Scan Delegator probes a Broadcaster with
the help of a Broadcast Assistant, a new BAP session is added for the
Broadcaster device before additional session information is initialized
(like the bt_bap session). This causes the bap debug func to not be set
in bap_data_add.

This commit adds an explicit call to set the function after the bt_bap
session is created.
---
 profiles/audio/bap.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 100acca57..c45717ef2 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -3243,6 +3243,9 @@  static int bap_bcast_probe(struct btd_service *service)
 		free(data);
 		return -EINVAL;
 	}
+
+	bt_bap_set_debug(data->bap, bap_debug, NULL, NULL);
+
 	data->bcast_snks = queue_new();
 
 	if (!bt_bap_attach(data->bap, NULL)) {