Skip to content

Conversation

Thalley
Copy link
Contributor

@Thalley Thalley commented Sep 27, 2025

Fixes a few issues reported by sonarcloud w.r.t. complex functions and a missing read of a variable.

Move the subgroup parameter validation to its own function to
reduce the size and complexity of valid_broadcast_source_param
to make Sonarcube happy.

Signed-off-by: Emil Gydesen <[email protected]>
Refactor the bt_bap_broadcast_source_reconfig function to be less
complex by splitting the verification into multiple functions.

Additionally, it also fixes a rare, but potential, issue where
some subgroups were updated before a later subgroup would fail
to be updated. Added can_merge_codec_cfg_data to verify correctness
before we attempt to update any subgroups. This new check is also
applied to bt_bap_broadcast_source_create.

Signed-off-by: Emil Gydesen <[email protected]>
The broadcast_state variable was not used in
bt_bap_broadcast_source_update_metadata to verify the
state, but broadcast_source_get_state was instead called
twice.

Signed-off-by: Emil Gydesen <[email protected]>
@Thalley Thalley force-pushed the broadcast_source_sonar_fixes branch from fd71104 to 2cdc368 Compare October 13, 2025 12:11
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants