From 705de2f98d8e2bdb18f46aee4cb58eaa35f3404b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 10 Aug 2015 17:36:47 +0200 Subject: [PATCH] Revert "Avoid formatting debug message uselessly" This reverts commit 925a72628b226203e94400da8d43889003804eae. Reason: introduced an ABI change in the maintenance branch. --- include/polarssl/debug.h | 7 +------ library/debug.c | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/polarssl/debug.h b/include/polarssl/debug.h index 406cfa8be..2dd89a227 100644 --- a/include/polarssl/debug.h +++ b/include/polarssl/debug.h @@ -57,10 +57,7 @@ #define SSL_DEBUG_MSG( level, args ) \ - do { \ - if( level <= debug_threshold ) \ - debug_print_msg_free( ssl, level, __FILE__, __LINE__, debug_fmt args ); \ - } while( 0 ) + debug_print_msg_free( ssl, level, __FILE__, __LINE__, debug_fmt args ); #define SSL_DEBUG_RET( level, text, ret ) \ debug_print_ret( ssl, level, __FILE__, __LINE__, text, ret ); @@ -150,8 +147,6 @@ void debug_print_crt( const ssl_context *ssl, int level, const char *text, const x509_crt *crt ); #endif -extern int debug_threshold; - #ifdef __cplusplus } #endif diff --git a/library/debug.c b/library/debug.c index 0aa90e1b2..9adcf07be 100644 --- a/library/debug.c +++ b/library/debug.c @@ -55,7 +55,7 @@ #define DEBUG_BUF_SIZE 512 static int debug_log_mode = POLARSSL_DEBUG_DFL_MODE; -int debug_threshold = 0; +static int debug_threshold = 0; void debug_set_log_mode( int log_mode ) {