070-ssl-fix-compilation-against-non-debug-mbedtls.patch (1035B)
1 From 261cf19bfa3dea10ed0f2ebbb2d945c19c9a2804 Mon Sep 17 00:00:00 2001 2 From: Hauke Mehrtens <hauke@hauke-m.de> 3 Date: Sun, 4 Dec 2016 00:18:37 +0100 4 Subject: [PATCH 5/7] ssl: fix compilation against non debug mbedtls 5 6 The function mbedtls_debug_set_threshold() is only available when 7 MBEDTLS_DEBUG_C is set. make the call depend on this condition. 8 9 Change-Id: I8158bc4c55b428167e36084e7a46359c269c5fc7 10 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> 11 --- 12 resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 2 ++ 13 1 file changed, 2 insertions(+) 14 15 --- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c 16 +++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c 17 @@ -1278,8 +1278,10 @@ static int InitConfig(mbedtls_ssl_config 18 19 #if !defined(NDEBUG) || defined(TB_LOG) 20 mbedtls_ssl_conf_dbg(conf, DebugSsl, NULL); 21 +#if defined(MBEDTLS_DEBUG_C) 22 mbedtls_debug_set_threshold(MBED_TLS_DEBUG_LEVEL); 23 #endif 24 +#endif 25 OIC_LOG_V(DEBUG, NET_SSL_TAG, "Out %s", __func__); 26 return 0; 27 }