Module: sip-router
Branch: sr_3.0
Commit: e9c0d837dccb65c10895c41f42d8d2d82e944f7a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e9c0d83…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri Feb 26 13:39:55 2010 +0100
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)
---
modules/tls/tls_init.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules/tls/tls_init.c b/modules/tls/tls_init.c
index b0f07f9..5c8e832 100644
--- a/modules/tls/tls_init.c
+++ b/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>
/*