mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
Update protocol_esp32_lws_ota.c
Corrected partition range check Use of library constant
This commit is contained in:
parent
e77dafba6f
commit
57f7f54555
1 changed files with 3 additions and 3 deletions
|
@ -72,9 +72,9 @@ ota_choose_part(void)
|
|||
if (part == bootpart)
|
||||
goto next;
|
||||
|
||||
/* OTA Partition numbering is from _OTA_MIN to less than _OTA_MAX */
|
||||
if (part->subtype < ESP_PARTITION_SUBTYPE_APP_OTA_MIN ||
|
||||
part->subtype >= ESP_PARTITION_SUBTYPE_APP_OTA_MIN +
|
||||
ESP_PARTITION_SUBTYPE_APP_OTA_MAX)
|
||||
part->subtype >= ESP_PARTITION_SUBTYPE_APP_OTA_MAX)
|
||||
goto next;
|
||||
|
||||
break;
|
||||
|
@ -112,7 +112,7 @@ ota_file_upload_cb(void *data, const char *name, const char *filename,
|
|||
if (!pss->part)
|
||||
return 1;
|
||||
|
||||
if (esp_ota_begin(pss->part, (long)-1, &pss->otahandle) != ESP_OK) {
|
||||
if (esp_ota_begin(pss->part, OTA_SIZE_UNKNOWN, &pss->otahandle) != ESP_OK) {
|
||||
lwsl_err("OTA: Failed to begin\n");
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue