From a4d755ee4f71bc0f335dc6fd9626e535662afec2 Mon Sep 17 00:00:00 2001 From: Szymon Czapracki Date: Thu, 31 Oct 2024 14:27:46 +0100 Subject: [PATCH] nimble/audio/bass: Fix condition in address recognition This commit fixes logic for address recognition in add_source operation --- nimble/host/audio/services/bass/src/ble_audio_svc_bass.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c b/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c index e3cecb060..bba9e68cd 100644 --- a/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c +++ b/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c @@ -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;