Browse Source

tls: TLS_MALLOC_DBG can now be set on make cfg

Enabling tls extra malloc debugging info, does not require anymore
editing tls_init.c. It can be enabled at cfg time
(make cfg extra_defs=-DTLS_MALLOC_DBG) or at compile/re-compile
time ( make -C modules/tls clean;
       make -C modules/tls extra_defs=-DTLS_MALLOC_DBG).
When TLS_MALLOC_DBG is enabled, an extra warning will be printed
at compile time. NO_TLS_MALLOC_DBG takes precedence over
TLS_MALLOC_DBG.
(cherry picked from commit 9bc19d4994f20aa354092aba9ae784de91547fc6)
Andrei Pelinescu-Onciul 15 years ago
parent
commit
462dbe484d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      modules/tls/tls_init.c

+ 4 - 0
modules/tls/tls_init.c

@@ -115,12 +115,16 @@ int tls_force_run = 0; /* ignore some start-up sanity checks, use it
 
 const SSL_METHOD* ssl_methods[TLS_USE_SSLv23 + 1];
 
+#ifdef NO_TLS_MALLOC_DBG
 #undef TLS_MALLOC_DBG /* extra malloc debug info from openssl */
+#endif /* NO_TLS_MALLOC_DBG */
+
 /*
  * Wrappers around SER shared memory functions
  * (which can be macros)
  */
 #ifdef TLS_MALLOC_DBG
+#warning "tls module compiled with malloc debugging info (extra overhead)"
 #include <execinfo.h>
 
 /*