diff mbox series

[BlueZ] bap: call select_cb on bt_bap_cancel_select() to clean up

Message ID 7f5110805a5180fb910d735f631c6f3b9a19dee4.1713624621.git.pav@iki.fi
State New
Headers show
Series [BlueZ] bap: call select_cb on bt_bap_cancel_select() to clean up | expand

Commit Message

Pauli Virtanen April 20, 2024, 2:52 p.m. UTC
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(-)

Comments

patchwork-bot+bluetooth@kernel.org April 22, 2024, 7 p.m. UTC | #1
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Sat, 20 Apr 2024 17:52:48 +0300 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [BlueZ] bap: call select_cb on bt_bap_cancel_select() to clean up
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=8e5f3433dc5f

You are awesome, thank you!
diff mbox series

Patch

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;
 	}