070-ssl-fix-compilation-against-non-debug-mbedtls.patch 1.0 KB

123456789101112131415161718192021222324252627
  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. The function mbedtls_debug_set_threshold() is only available when
  6. MBEDTLS_DEBUG_C is set. make the call depend on this condition.
  7. Change-Id: I8158bc4c55b428167e36084e7a46359c269c5fc7
  8. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  9. ---
  10. resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 2 ++
  11. 1 file changed, 2 insertions(+)
  12. --- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
  13. +++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
  14. @@ -1278,8 +1278,10 @@ static int InitConfig(mbedtls_ssl_config
  15. #if !defined(NDEBUG) || defined(TB_LOG)
  16. mbedtls_ssl_conf_dbg(conf, DebugSsl, NULL);
  17. +#if defined(MBEDTLS_DEBUG_C)
  18. mbedtls_debug_set_threshold(MBED_TLS_DEBUG_LEVEL);
  19. #endif
  20. +#endif
  21. OIC_LOG_V(DEBUG, NET_SSL_TAG, "Out %s", __func__);
  22. return 0;
  23. }