ssl: fix compilation against non debug mbedtls
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 3 Dec 2016 23:18:37 +0000 (00:18 +0100)
committerKevin Kane <kkane@microsoft.com>
Wed, 15 Feb 2017 17:41:52 +0000 (17:41 +0000)
The function mbedtls_debug_set_threshold() is only available when
MBEDTLS_DEBUG_C is set. make the call depend on this condition.

Change-Id: I8158bc4c55b428167e36084e7a46359c269c5fc7
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15119
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c

index 45764f2..9c6a048 100644 (file)
@@ -1393,8 +1393,10 @@ static int InitConfig(mbedtls_ssl_config * conf, int transport, int mode)
 
 #if !defined(NDEBUG) || defined(TB_LOG)
     mbedtls_ssl_conf_dbg(conf, DebugSsl, NULL);
+#if defined(MBEDTLS_DEBUG_C)
     mbedtls_debug_set_threshold(MBED_TLS_DEBUG_LEVEL);
 #endif
+#endif
     OIC_LOG_V(DEBUG, NET_SSL_TAG, "Out %s", __func__);
     return 0;
 }