mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/wrong_ota_upgrade_size_log_v5.1' into 'release/v5.1'
fix(esp_https_ota): Fix wrong debug print for ota upgrade size (v5.1) See merge request espressif/esp-idf!27352
This commit is contained in:
commit
4788804f6d
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -501,18 +501,18 @@ esp_err_t esp_https_ota_perform(esp_https_ota_handle_t https_ota_handle)
|
||||
*/
|
||||
int binary_file_len = 0;
|
||||
if (handle->binary_file_len) {
|
||||
/*
|
||||
* Header length gets added to handle->binary_file_len in _ota_write
|
||||
* Clear handle->binary_file_len to avoid additional 289 bytes in binary_file_len
|
||||
*/
|
||||
binary_file_len = handle->binary_file_len;
|
||||
handle->binary_file_len = 0;
|
||||
} else {
|
||||
if (read_header(handle) != ESP_OK) {
|
||||
return ESP_FAIL;
|
||||
}
|
||||
binary_file_len = IMAGE_HEADER_SIZE;
|
||||
}
|
||||
/*
|
||||
* Header length gets added to handle->binary_file_len in _ota_write
|
||||
* Clear handle->binary_file_len to avoid additional bytes in upgrade image size calculation
|
||||
*/
|
||||
handle->binary_file_len = 0;
|
||||
|
||||
const void *data_buf = (const void *) handle->ota_upgrade_buf;
|
||||
#if CONFIG_ESP_HTTPS_OTA_DECRYPT_CB
|
||||
|
Loading…
Reference in New Issue
Block a user