diff --git a/components/bt/bluedroid/api/esp_bt_main.c b/components/bt/bluedroid/api/esp_bt_main.c index 1b4f46c52d..8aff98e8b9 100644 --- a/components/bt/bluedroid/api/esp_bt_main.c +++ b/components/bt/bluedroid/api/esp_bt_main.c @@ -119,7 +119,7 @@ esp_err_t esp_bluedroid_init(void) future_t **future_p; if (esp_bt_controller_get_status() != ESP_BT_CONTROLLER_STATUS_ENABLED) { - LOG_ERROR("Conroller not initialised\n"); + LOG_ERROR("Controller not initialised\n"); return ESP_ERR_INVALID_STATE; } diff --git a/components/esp32/sleep_modes.c b/components/esp32/sleep_modes.c index f3bd071f3f..d460365905 100644 --- a/components/esp32/sleep_modes.c +++ b/components/esp32/sleep_modes.c @@ -81,7 +81,9 @@ static sleep_config_t s_config = { .wakeup_triggers = 0 }; -bool s_light_sleep_wakeup = false; +/* Internal variable used to track if light sleep wakeup sources are to be + expected when determining wakeup cause. */ +static bool s_light_sleep_wakeup = false; /* Updating RTC_MEMORY_CRC_REG register via set_rtc_memory_crc() is not thread-safe. */ diff --git a/components/esp_http_client/esp_http_client.c b/components/esp_http_client/esp_http_client.c index c7a613bca9..2921c0d335 100644 --- a/components/esp_http_client/esp_http_client.c +++ b/components/esp_http_client/esp_http_client.c @@ -490,6 +490,14 @@ esp_http_client_handle_t esp_http_client_init(const esp_http_client_config_t *co if (config->cert_pem) { esp_transport_ssl_set_cert_data(ssl, config->cert_pem, strlen(config->cert_pem)); } + + if (config->client_cert_pem) { + esp_transport_ssl_set_client_cert_data(ssl, config->client_cert_pem, strlen(config->client_cert_pem)); + } + + if (config->client_key_pem) { + esp_transport_ssl_set_client_key_data(ssl, config->client_key_pem, strlen(config->client_key_pem)); + } #endif if (_set_config(client, config) != ESP_OK) { @@ -1100,6 +1108,7 @@ success: esp_err_t esp_http_client_open(esp_http_client_handle_t client, int write_len) { + client->post_len = write_len; esp_err_t err; if ((err = esp_http_client_connect(client)) != ESP_OK) { return err; diff --git a/components/esp_http_client/include/esp_http_client.h b/components/esp_http_client/include/esp_http_client.h index 4e940a6d10..77e9d85208 100644 --- a/components/esp_http_client/include/esp_http_client.h +++ b/components/esp_http_client/include/esp_http_client.h @@ -105,7 +105,9 @@ typedef struct { esp_http_client_auth_type_t auth_type; /*!< Http authentication type, see `esp_http_client_auth_type_t` */ const char *path; /*!< HTTP Path, if not set, default is `/` */ const char *query; /*!< HTTP query */ - const char *cert_pem; /*!< SSL Certification, PEM format as string, if the client requires to verify server */ + const char *cert_pem; /*!< SSL server certification, PEM format as string, if the client requires to verify server */ + const char *client_cert_pem; /*!< SSL client certification, PEM format as string, if the server requires to verify client */ + const char *client_key_pem; /*!< SSL client key, PEM format as string, if the server requires to verify client */ esp_http_client_method_t method; /*!< HTTP Method */ int timeout_ms; /*!< Network timeout in milliseconds */ bool disable_auto_redirect; /*!< Disable HTTP automatic redirects */ diff --git a/components/esp_ringbuf/ringbuf.c b/components/esp_ringbuf/ringbuf.c index 9a7117b74c..558b61c6d8 100644 --- a/components/esp_ringbuf/ringbuf.c +++ b/components/esp_ringbuf/ringbuf.c @@ -920,7 +920,7 @@ BaseType_t xRingbufferReceiveSplitFromISR(RingbufHandle_t xRingbuffer, void **pp configASSERT(ppvHeadItem != NULL && ppvTailItem != NULL); //Attempt to retrieve multiple items - void *pvTempHeadItem, *pvTempTailItem; + void *pvTempHeadItem = NULL, *pvTempTailItem = NULL; size_t xTempHeadSize, xTempTailSize; if (prvReceiveGenericFromISR(pxRingbuffer, &pvTempHeadItem, &pvTempTailItem, &xTempHeadSize, &xTempTailSize, 0) == pdTRUE) { //At least one item was received diff --git a/components/soc/esp32/rtc_clk.c b/components/soc/esp32/rtc_clk.c index 434691b307..3156517b92 100644 --- a/components/soc/esp32/rtc_clk.c +++ b/components/soc/esp32/rtc_clk.c @@ -503,7 +503,7 @@ rtc_cpu_freq_t rtc_clk_cpu_freq_get() { rtc_cpu_freq_config_t config; rtc_clk_cpu_freq_get_config(&config); - rtc_cpu_freq_t freq; + rtc_cpu_freq_t freq = RTC_CPU_FREQ_XTAL; rtc_clk_cpu_freq_from_mhz_internal(config.freq_mhz, &freq); return freq; } diff --git a/components/tcp_transport/transport_ssl.c b/components/tcp_transport/transport_ssl.c index 436f8a9436..59ff64de5d 100644 --- a/components/tcp_transport/transport_ssl.c +++ b/components/tcp_transport/transport_ssl.c @@ -130,6 +130,9 @@ static int ssl_read(esp_transport_handle_t t, char *buffer, int len, int timeout if (ret < 0) { ESP_LOGE(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno)); } + if (ret == 0) { + ret = -1; + } return ret; }