mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/update_incorrect_refereing_of_function_esp_https_ota_get_img_desc' into 'master'
fix(esp_https_ota): fix incorrect references of API esp_https_ota_get_img_desc() See merge request espressif/esp-idf!28891
This commit is contained in:
commit
e0dd917d31
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user