mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 19:54:32 +02:00
Merge branch 'fix/esp_tls_typo_v4.1' into 'release/v4.1'
Fix/esp_tls_mispaced_paranthesis (v4.1) See merge request espressif/esp-idf!12632
This commit is contained in:
@@ -401,7 +401,7 @@ esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls_cfg_t
|
|||||||
|
|
||||||
if (cfg->alpn_protos) {
|
if (cfg->alpn_protos) {
|
||||||
#ifdef CONFIG_MBEDTLS_SSL_ALPN
|
#ifdef CONFIG_MBEDTLS_SSL_ALPN
|
||||||
if ((ret = mbedtls_ssl_conf_alpn_protocols(&tls->conf, cfg->alpn_protos) != 0)) {
|
if ((ret = mbedtls_ssl_conf_alpn_protocols(&tls->conf, cfg->alpn_protos)) != 0) {
|
||||||
ESP_LOGE(TAG, "mbedtls_ssl_conf_alpn_protocols returned -0x%x", -ret);
|
ESP_LOGE(TAG, "mbedtls_ssl_conf_alpn_protocols returned -0x%x", -ret);
|
||||||
ESP_INT_EVENT_TRACKER_CAPTURE(tls->error_handle, ERR_TYPE_MBEDTLS, -ret);
|
ESP_INT_EVENT_TRACKER_CAPTURE(tls->error_handle, ERR_TYPE_MBEDTLS, -ret);
|
||||||
return ESP_ERR_MBEDTLS_SSL_CONF_ALPN_PROTOCOLS_FAILED;
|
return ESP_ERR_MBEDTLS_SSL_CONF_ALPN_PROTOCOLS_FAILED;
|
||||||
|
@@ -378,7 +378,7 @@ static int protocomm_version_handler(uint32_t session_id,
|
|||||||
/* Output is a non null terminated string with length specified */
|
/* Output is a non null terminated string with length specified */
|
||||||
*outlen = strlen(pc->ver);
|
*outlen = strlen(pc->ver);
|
||||||
*outbuf = malloc(*outlen);
|
*outbuf = malloc(*outlen);
|
||||||
if (outbuf == NULL) {
|
if (*outbuf == NULL) {
|
||||||
ESP_LOGE(TAG, "Failed to allocate memory for version response");
|
ESP_LOGE(TAG, "Failed to allocate memory for version response");
|
||||||
return ESP_ERR_NO_MEM;
|
return ESP_ERR_NO_MEM;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user