Skip to content

Commit

Permalink
feat(bt/bluedroid): Support scan response data length zero in BLE
Browse files Browse the repository at this point in the history
  • Loading branch information
esp-zhp committed Oct 13, 2023
1 parent 7492c00 commit 2b551b0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/bt/host/bluedroid/api/esp_gap_ble_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,7 @@ esp_err_t esp_ble_gap_config_scan_rsp_data_raw(uint8_t *raw_data, uint32_t raw_d

ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);

if (raw_data == NULL
|| (raw_data_len <= 0 || raw_data_len > ESP_BLE_SCAN_RSP_DATA_LEN_MAX)) {
if ((raw_data_len != 0 && raw_data == NULL) || raw_data_len > ESP_BLE_ADV_DATA_LEN_MAX) {
return ESP_ERR_INVALID_ARG;
}

Expand Down

0 comments on commit 2b551b0

Please sign in to comment.