From b983c31d4a76bb8b90f42099c21ffacf833ab271 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 1 Feb 2024 10:08:21 -0500 Subject: [PATCH] shared/bap: Allow using bt_bap_attach for broadcast This enables use of bt_bap_attach for broadcast by checking if there is a client or ATT instance. --- src/shared/bap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index 851d6a5fa..ce8d35f86 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -4156,7 +4156,8 @@ bool bt_bap_attach(struct bt_bap *bap, struct bt_gatt_client *client) queue_foreach(bap_cbs, bap_attached, bap); if (!client) { - bap_attach_att(bap, bap->att); + if (bap->att) + bap_attach_att(bap, bap->att); return true; } -- 2.47.3