feat(esp_https_ota): Skipped read_header and write for custom partition

- For custom partition less than IMAGE_HEADER_SIZE (1024 bytes), give
error - 'complete header not received'
- Skipped the read_header function for custom partition, and directly
jumped to IN_PROGRESS state
This commit is contained in:
hrushikesh.bhosale
2026-02-04 12:31:34 +05:30
parent 148e333495
commit 6ea9db6008
+6 -1
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -728,6 +728,11 @@ esp_err_t esp_https_ota_perform(esp_https_ota_handle_t https_ota_handle)
}
esp_ota_set_final_partition(handle->update_handle, handle->partition.final, handle->partition.finalize_with_copy);
handle->state = ESP_HTTPS_OTA_IN_PROGRESS;
if (handle->partition.final->type != ESP_PARTITION_TYPE_APP
&& handle->partition.final->type != ESP_PARTITION_TYPE_BOOTLOADER) {
return ESP_ERR_HTTPS_OTA_IN_PROGRESS;
}
/* In case `esp_https_ota_get_img_desc` was invoked first,
then the image data read there should be written to OTA partition
*/