ESP_TLS: Generalizing error messages for esp_tls

:Replace mbedtls specific error messages
This commit is contained in:
Aditya Patwardhan
2019-09-17 17:11:02 +05:30
parent f7eaa5f946
commit 988f0c8feb
5 changed files with 22 additions and 14 deletions

View File

@@ -96,7 +96,7 @@ static void https_get_task(void *pvParameters)
if (ret >= 0) {
ESP_LOGI(TAG, "%d bytes written", ret);
written_bytes += ret;
} else if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
} else if (ret != ESP_TLS_ERR_SSL_WANT_READ && ret != ESP_TLS_ERR_SSL_WANT_WRITE) {
ESP_LOGE(TAG, "esp_tls_conn_write returned 0x%x", ret);
goto exit;
}
@@ -110,7 +110,7 @@ static void https_get_task(void *pvParameters)
bzero(buf, sizeof(buf));
ret = esp_tls_conn_read(tls, (char *)buf, len);
if(ret == MBEDTLS_ERR_SSL_WANT_WRITE || ret == MBEDTLS_ERR_SSL_WANT_READ)
if(ret == ESP_TLS_ERR_SSL_WANT_WRITE || ret == ESP_TLS_ERR_SSL_WANT_READ)
continue;
if(ret < 0)