[asterisk-commits] tilghman: branch 1.4 r59078 - /branches/1.4/main/logger.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Mar 20 14:04:52 MST 2007


Author: tilghman
Date: Tue Mar 20 16:04:52 2007
New Revision: 59078

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59078
Log:
Fix defines for inline stack backtraces (only used by developers anyway)

Modified:
    branches/1.4/main/logger.c

Modified: branches/1.4/main/logger.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/logger.c?view=diff&rev=59078&r1=59077&r2=59078
==============================================================================
--- branches/1.4/main/logger.c (original)
+++ branches/1.4/main/logger.c Tue Mar 20 16:04:52 2007
@@ -38,7 +38,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <sys/stat.h>
-#ifdef STACK_BACKTRACES
+#if ((defined(AST_DEVMODE)) && (defined(Linux)))
 #include <execinfo.h>
 #define MAX_BACKTRACE_FRAMES 20
 #endif
@@ -819,7 +819,8 @@
 
 void ast_backtrace(void)
 {
-#ifdef STACK_BACKTRACES
+#ifdef Linux
+#ifdef AST_DEVMODE
 	int count=0, i=0;
 	void **addresses;
 	char **strings;
@@ -838,11 +839,10 @@
 		free(addresses);
 	}
 #else
-#ifdef Linux
-	ast_log(LOG_WARNING, "Must compile with 'make dont-optimize' for stack backtraces\n");
-#else
+	ast_log(LOG_WARNING, "Must run configure with '--enable-dev-mode' for stack backtraces.\n");
+#endif
+#else /* ndef Linux */
 	ast_log(LOG_WARNING, "Inline stack backtraces are only available on the Linux platform.\n");
-#endif
 #endif
 }
 



More information about the asterisk-commits mailing list