From 8e5f3433dc5f88164aeba8e077cd125717146e34 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 20 Apr 2024 17:52:48 +0300 Subject: [PATCH] bap: call select_cb on bt_bap_cancel_select() to clean up Have bt_bap_cancel_select() to trigger the callback function with error code, simplifying the cleanup when ep is freed while SelectProperties is ongoing. Fixes bap_data->selecting not being decremented when ep setup is canceled, which results to transports not being created thereafter. Fixes: 41d6c4e1c92f ("bap: cancel ongoing SelectProperties() before freeing the ep") --- profiles/audio/media.c | 1 - 1 file changed, 1 deletion(-) diff --git a/profiles/audio/media.c b/profiles/audio/media.c index 144f6bfc4..07147a25d 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -1055,7 +1055,6 @@ static void pac_cancel_select(struct bt_bap_pac *lpac, bt_bap_pac_select_t cb, continue; } - req->cb = NULL; media_endpoint_cancel(req); l = endpoint->requests; } -- 2.47.3