Skip to content

Commit bcd6dcf

Browse files
committed
Fix compile error with IDF and mbedtls debug off
1 parent 00c1a65 commit bcd6dcf

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

libraries/WiFiClientSecure/src/WiFiClientSecure.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ WiFiClientSecure::WiFiClientSecure()
3939
_CA_cert = NULL;
4040
_cert = NULL;
4141
_private_key = NULL;
42+
next = NULL;
4243
}
4344

4445

@@ -57,6 +58,7 @@ WiFiClientSecure::WiFiClientSecure(int sock)
5758
_CA_cert = NULL;
5859
_cert = NULL;
5960
_private_key = NULL;
61+
next = NULL;
6062
}
6163

6264
WiFiClientSecure::~WiFiClientSecure()

libraries/WiFiClientSecure/src/ssl_client.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818

1919
const char *pers = "esp32-tls";
2020

21-
#define DEBUG true //Set false to supress debug messages
21+
#define DEBUG //Comment to supress debug messages
2222

2323
#ifdef DEBUG
2424
#define DEBUG_PRINT(...) printf( __VA_ARGS__ )
2525
#else
2626
#define DEBUG_PRINT(x)
2727
#endif
2828

29-
#ifdef MBEDTLS_DEBUG_C
29+
#ifdef CONFIG_MBEDTLS_DEBUG
3030

3131
#define MBEDTLS_DEBUG_LEVEL 4
3232

@@ -201,7 +201,7 @@ int start_ssl_client(sslclient_context *ssl_client, uint32_t ipAddress, uint32_t
201201
}
202202

203203
mbedtls_ssl_conf_rng(&ssl_client->ssl_conf, mbedtls_ctr_drbg_random, &ssl_client->drbg_ctx);
204-
#ifdef MBEDTLS_DEBUG_C
204+
#ifdef CONFIG_MBEDTLS_DEBUG
205205
mbedtls_debug_set_threshold(MBEDTLS_DEBUG_LEVEL);
206206
mbedtls_ssl_conf_dbg(&ssl_client->ssl_conf, mbedtls_debug, NULL);
207207
#endif

0 commit comments

Comments
 (0)