public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] bap: call select_cb on bt_bap_cancel_select() to clean up
@ 2024-04-20 14:52 Pauli Virtanen
  2024-04-20 16:37 ` [BlueZ] " bluez.test.bot
  2024-04-22 19:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Pauli Virtanen @ 2024-04-20 14:52 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

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.44.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-22 19:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-20 14:52 [PATCH BlueZ] bap: call select_cb on bt_bap_cancel_select() to clean up Pauli Virtanen
2024-04-20 16:37 ` [BlueZ] " bluez.test.bot
2024-04-22 19:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox