Skip to content

Conversation

Thalley
Copy link
Contributor

@Thalley Thalley commented Sep 22, 2025

Add check in valid_unicast_audio_start_param to verify that the ep connection matches the member_conn.

Add a new function, bt_bap_ep_get_conn, which returns
the ACL connection for the endpoint. This works because
endpoints are specific to an ACL in BAP. The function
returns a pointer with a new reference similar to the
lookup functions from conn.h

The conn pointer was not added to the bt_bap_ep_info
struct, as doing so would be more likely to cause
reference leaks if the caller did not care about the
conn pointer when using bt_bap_ep_get_info. It can be
added later if that is requested.

Signed-off-by: Emil Gydesen <[email protected]>
Add entry for the new function bt_bap_ep_get_conn.

Signed-off-by: Emil Gydesen <[email protected]>
Add steps in the BAP tests to verify the correctness of
bt_bap_ep_get_conn.

Signed-off-by: Emil Gydesen <[email protected]>
Add check in valid_unicast_audio_start_param to verify
that the ep connection matches the member_conn.

Signed-off-by: Emil Gydesen <[email protected]>
Add bt_bap_unicast_client_unregister_cb to unregister BAP
unicast client callbacks. This is required for unittests
to clean up between runs.

Signed-off-by: Emil Gydesen <[email protected]>
Instead of declaring the endpoints in the unit tests, we
not define them in the mock unicast client and use the
discover function to get pointers.

This allows for a proper implementation of
bt_bap_unicast_client_has_ep as well as makes the tests more similar
to a normal application.

Signed-off-by: Emil Gydesen <[email protected]>
@Thalley Thalley force-pushed the cap_ep_conn_check branch from 08dc01f to 80f9c25 Compare October 7, 2025 08:52
Copy link

sonarqubecloud bot commented Oct 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant