ssl_client.cpp: Fix parameter name in _handle_error. (#5217)

This commit is contained in:
rolsen 2021-06-09 03:33:52 -06:00 committed by GitHub
parent f385ee4219
commit 39155e70a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@
const char *pers = "esp32-tls"; const char *pers = "esp32-tls";
static int _handle_error(int err, const char * file, int line) static int _handle_error(int err, const char * function, int line)
{ {
if(err == -30848){ if(err == -30848){
return err; return err;
@ -33,9 +33,9 @@ static int _handle_error(int err, const char * file, int line)
#ifdef MBEDTLS_ERROR_C #ifdef MBEDTLS_ERROR_C
char error_buf[100]; char error_buf[100];
mbedtls_strerror(err, error_buf, 100); mbedtls_strerror(err, error_buf, 100);
log_e("[%s():%d]: (%d) %s", file, line, err, error_buf); log_e("[%s():%d]: (%d) %s", function, line, err, error_buf);
#else #else
log_e("[%s():%d]: code %d", file, line, err); log_e("[%s():%d]: code %d", function, line, err);
#endif #endif
return err; return err;
} }