mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
esp_http_client/esp_https_ota: Removed errno checks
- Returned -ESP_ERR_HTTP_EAGAIN for timeout errors from esp_http_client whenever tcp transport layer returns connection timeout - Removed redundant conditional statements as required Co-authored-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
This commit is contained in:
@@ -427,6 +427,7 @@ int esp_http_client_write(esp_http_client_handle_t client, const char *buffer, i
|
||||
* @return
|
||||
* - (0) if stream doesn't contain content-length header, or chunked encoding (checked by `esp_http_client_is_chunked` response)
|
||||
* - (-1: ESP_FAIL) if any errors
|
||||
* - (-ESP_ERR_HTTP_EAGAIN = -0x7007) if call is timed-out before any data was ready
|
||||
* - Download data length defined by content-length header
|
||||
*/
|
||||
int64_t esp_http_client_fetch_headers(esp_http_client_handle_t client);
|
||||
@@ -451,6 +452,8 @@ bool esp_http_client_is_chunked_response(esp_http_client_handle_t client);
|
||||
* @return
|
||||
* - (-1) if any errors
|
||||
* - Length of data was read
|
||||
*
|
||||
* @note (-ESP_ERR_HTTP_EAGAIN = -0x7007) is returned when call is timed-out before any data was ready
|
||||
*/
|
||||
int esp_http_client_read(esp_http_client_handle_t client, char *buffer, int len);
|
||||
|
||||
|
Reference in New Issue
Block a user