Merge branch 'bugfix/ble_mesh_heartbeat_filter_add_v5.2' into 'release/v5.2'

Fix(ble_mesh):fix error condition for heartbeat filter adding node address (v5.2)

See merge request espressif/esp-idf!29986
This commit is contained in:
Island
2024-04-09 12:05:27 +08:00

View File

@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@ -576,9 +576,9 @@ esp_err_t esp_ble_mesh_provisioner_set_heartbeat_filter_info(uint8_t op, esp_ble
return ESP_ERR_INVALID_ARG; return ESP_ERR_INVALID_ARG;
} }
if (!ESP_BLE_MESH_ADDR_IS_UNICAST(info->hb_src) && if (!(ESP_BLE_MESH_ADDR_IS_UNICAST(info->hb_src) &&
!ESP_BLE_MESH_ADDR_IS_UNICAST(info->hb_dst) && (ESP_BLE_MESH_ADDR_IS_UNICAST(info->hb_dst) ||
!ESP_BLE_MESH_ADDR_IS_GROUP(info->hb_dst)) { ESP_BLE_MESH_ADDR_IS_GROUP(info->hb_dst)))) {
return ESP_ERR_INVALID_ARG; return ESP_ERR_INVALID_ARG;
} }