From 4e6d39f0096649d6349cab1f5d85eea12a7414b5 Mon Sep 17 00:00:00 2001 From: Jitin George Date: Thu, 2 May 2019 16:09:55 +0530 Subject: [PATCH] esp-http-client: Fix incorrect event name HTTP_EVENT_HEADER_SENT Closes https://github.com/espressif/esp-idf/issues/3095 --- components/esp_http_client/esp_http_client.c | 2 +- components/esp_http_client/include/esp_http_client.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/esp_http_client/esp_http_client.c b/components/esp_http_client/esp_http_client.c index b2a58f725b..4af28f9f59 100644 --- a/components/esp_http_client/esp_http_client.c +++ b/components/esp_http_client/esp_http_client.c @@ -1119,7 +1119,7 @@ static esp_err_t esp_http_client_request_send(esp_http_client_handle_t client, i client->data_written_index = 0; client->data_write_left = client->post_len; - http_dispatch_event(client, HTTP_EVENT_HEADER_SENT, NULL, 0); + http_dispatch_event(client, HTTP_EVENT_HEADERS_SENT, NULL, 0); client->state = HTTP_STATE_REQ_COMPLETE_HEADER; return ESP_OK; } diff --git a/components/esp_http_client/include/esp_http_client.h b/components/esp_http_client/include/esp_http_client.h index 102bf9e3ea..9b7275c9f7 100644 --- a/components/esp_http_client/include/esp_http_client.h +++ b/components/esp_http_client/include/esp_http_client.h @@ -35,7 +35,9 @@ typedef struct esp_http_client_event *esp_http_client_event_handle_t; typedef enum { HTTP_EVENT_ERROR = 0, /*!< This event occurs when there are any errors during execution */ HTTP_EVENT_ON_CONNECTED, /*!< Once the HTTP has been connected to the server, no data exchange has been performed */ - HTTP_EVENT_HEADER_SENT, /*!< After sending all the headers to the server */ + HTTP_EVENT_HEADERS_SENT, /*!< After sending all the headers to the server */ + HTTP_EVENT_HEADER_SENT = HTTP_EVENT_HEADERS_SENT, /*!< This header has been kept for backward compatability + and will be deprecated in future versions esp-idf */ HTTP_EVENT_ON_HEADER, /*!< Occurs when receiving each header sent from the server */ HTTP_EVENT_ON_DATA, /*!< Occurs when receiving data from the server, possibly multiple portions of the packet */ HTTP_EVENT_ON_FINISH, /*!< Occurs when finish a HTTP session */