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 committed Oct 31, 2024
1 parent 8f6b9df commit a4d755e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nimble/host/audio/services/bass/src/ble_audio_svc_bass.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,9 @@ 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 ||
operation.add_source.adv_addr.type != BLE_ADDR_RANDOM) {

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;
goto done;
Expand Down

0 comments on commit a4d755e

Please sign in to comment.