diff --git a/src/Arduino_ESP32_OTA.cpp b/src/Arduino_ESP32_OTA.cpp index 9839e0a..c082a24 100644 --- a/src/Arduino_ESP32_OTA.cpp +++ b/src/Arduino_ESP32_OTA.cpp @@ -136,13 +136,13 @@ int Arduino_ESP32_OTA::download(const char * ota_url) port = 443; } else { DEBUG_ERROR("%s: Failed to parse OTA URL %s", __FUNCTION__, ota_url); - return static_cast(Error::UrlParseError); + return static_cast(Error::UrlParse); } if (!_client->connect(url.host_.c_str(), port)) { DEBUG_ERROR("%s: Connection failure with OTA storage server %s", __FUNCTION__, url.host_.c_str()); - return static_cast(Error::ServerConnectError); + return static_cast(Error::ServerConnect); } _client->println(String("GET ") + url.path_.c_str() + " HTTP/1.1"); @@ -172,7 +172,7 @@ int Arduino_ESP32_OTA::download(const char * ota_url) if (!is_header_complete) { DEBUG_ERROR("%s: Error receiving HTTP header %s", __FUNCTION__, is_http_header_timeout ? "(timeout)":""); - return static_cast(Error::HttpHeaderError); + return static_cast(Error::HttpHeader); } /* Check HTTP response status code */ diff --git a/src/Arduino_ESP32_OTA.h b/src/Arduino_ESP32_OTA.h index 5062003..e91ace0 100644 --- a/src/Arduino_ESP32_OTA.h +++ b/src/Arduino_ESP32_OTA.h @@ -63,17 +63,17 @@ class Arduino_ESP32_OTA None = 0, NoOtaStorage = -2, OtaStorageInit = -3, - OtaStorageEnd = -4, - UrlParseError = -5, - ServerConnectError = -6, - HttpHeaderError = -7, + OtaHeaderLength = -5, + OtaHeaderCrc = -6, + OtaHeaterMagicNumber = -7, ParseHttpHeader = -8, - OtaHeaderLength = -9, - OtaHeaderCrc = -10, - OtaHeaterMagicNumber = -11, + UrlParse = -9, + ServerConnect = -10, + HttpHeader = -11, OtaDownload = -12, OtaHeaderTimeout = -13, - HttpResponse = -14 + HttpResponse = -14, + OtaStorageEnd = -15, }; Arduino_ESP32_OTA();