Skip to content

Commit 8882590

Browse files
committed
Bluetooth: BAP: Bcast Source: Add missing use of variable
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]>
1 parent 3dce722 commit 8882590

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/audio/bap_broadcast_source.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ int bt_bap_broadcast_source_update_metadata(struct bt_bap_broadcast_source *sour
10771077
}
10781078

10791079
broadcast_state = broadcast_source_get_state(source);
1080-
if (broadcast_source_get_state(source) != BT_BAP_EP_STATE_STREAMING) {
1080+
if (broadcast_state != BT_BAP_EP_STATE_STREAMING) {
10811081
LOG_DBG("Broadcast source invalid state: %u", broadcast_state);
10821082

10831083
return -EBADMSG;

0 commit comments

Comments
 (0)