fix(esp_https_ota): fix incorrectly reference of API esp_https_ota_get_img_desc()

esp_https_ota_get_img_desc() is incorrectly referred to as esp_https_ota_read_img_desc()
in some error messages.So, this MR updates related references

Closes https://github.com/espressif/esp-idf/issues/13065
pull/12800/head
nilesh.kale 2024-02-05 12:34:14 +05:30
rodzic 37f0447961
commit 3da0aa2d82
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -451,11 +451,11 @@ esp_err_t esp_https_ota_get_img_desc(esp_https_ota_handle_t https_ota_handle, es
esp_https_ota_t *handle = (esp_https_ota_t *)https_ota_handle;
if (handle == NULL || new_app_info == NULL) {
ESP_LOGE(TAG, "esp_https_ota_read_img_desc: Invalid argument");
ESP_LOGE(TAG, "esp_https_ota_get_img_desc: Invalid argument");
return ESP_ERR_INVALID_ARG;
}
if (handle->state < ESP_HTTPS_OTA_BEGIN) {
ESP_LOGE(TAG, "esp_https_ota_read_img_desc: Invalid state");
ESP_LOGE(TAG, "esp_https_ota_get_img_desc: Invalid state");
return ESP_ERR_INVALID_STATE;
}
if (read_header(handle) != ESP_OK) {
@ -508,7 +508,7 @@ esp_err_t esp_https_ota_perform(esp_https_ota_handle_t https_ota_handle)
return err;
}
handle->state = ESP_HTTPS_OTA_IN_PROGRESS;
/* In case `esp_https_ota_read_img_desc` was invoked first,
/* In case `esp_https_ota_get_img_desc` was invoked first,
then the image data read there should be written to OTA partition
*/
int binary_file_len = 0;

Wyświetl plik

@ -168,7 +168,7 @@ void advanced_ota_example_task(void *pvParameter)
esp_app_desc_t app_desc;
err = esp_https_ota_get_img_desc(https_ota_handle, &app_desc);
if (err != ESP_OK) {
ESP_LOGE(TAG, "esp_https_ota_read_img_desc failed");
ESP_LOGE(TAG, "esp_https_ota_get_img_desc failed");
goto ota_end;
}
err = validate_image_header(&app_desc);

Wyświetl plik

@ -225,7 +225,7 @@ def test_examples_protocol_advanced_https_ota_example_truncated_header(dut: Dut)
dut.expect('Starting Advanced OTA example', timeout=30)
print('writing to device: {}'.format('https://' + host_ip + ':' + str(server_port) + '/' + truncated_bin_name))
dut.write('https://' + host_ip + ':' + str(server_port) + '/' + truncated_bin_name)
dut.expect('advanced_https_ota_example: esp_https_ota_read_img_desc failed', timeout=30)
dut.expect('advanced_https_ota_example: esp_https_ota_get_img_desc failed', timeout=30)
try:
os.remove(binary_file)
except OSError: