Skip to content

Commit

Permalink
nimble/audio/bass: Fix condition in address recognition
Browse files Browse the repository at this point in the history
This commit fixes logic for address
recognition in add_source operation
  • Loading branch information
szymon-czapracki authored and sjanc committed Nov 7, 2024
1 parent 4e3ac5b commit 12b877e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nimble/host/audio/services/bass/src/ble_audio_svc_bass.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ ble_svc_audio_bass_add_source(uint8_t *data, uint16_t data_len, uint16_t conn_ha
operation.conn_handle = conn_handle;

operation.add_source.adv_addr.type = data[offset++];
if (operation.add_source.adv_addr.type != BLE_ADDR_PUBLIC ||

if (operation.add_source.adv_addr.type != BLE_ADDR_PUBLIC &&
operation.add_source.adv_addr.type != BLE_ADDR_RANDOM) {
rc = BLE_HS_EINVAL;
ev.bass_operation_status.status = BLE_HS_EINVAL;
Expand Down

0 comments on commit 12b877e

Please sign in to comment.