summaryrefslogtreecommitdiff
path: root/include/asterisk/logger.h
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2012-03-14 10:56:53 +0000
committerRussell Bryant <russell@russellbryant.com>2012-03-14 10:56:53 +0000
commit00b270833f3d5a58ab2acbcce1c5a16b0330aaeb (patch)
treefa6a02961aaeb6449becdcf7ff9fc2a80dcb85ad /include/asterisk/logger.h
parent6c9f009b6d208eeb656bc19ec2e1675f755c73a9 (diff)
Fix bogus reads/writes of console log levels in asterisk.c
This patch updates the NUMLOGLEVELS define in logger.h to 32, to match the fact that logger.c implements 32 log levels (because of the custom log level stuff). asterisk.c uses this define to size an array of levels per remote console. This array is modified in ast_console_toggle_loglevel(), which is called by the "logger set level" CLI command. While the documentation for the CLI command doesn't make it terribly obvious, you can use this CLI command to toggle a custom log level on a remote console, as well. However, doing so led to an invalid array index in asterisk.c. This array is read from any time a log message is written to a console. So, all custom log level messages resulted in a bogus read if a remote console was connected. ........ Merged revisions 359259 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359260 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/logger.h')
-rw-r--r--include/asterisk/logger.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h
index 8fdc97e65..c7f260c49 100644
--- a/include/asterisk/logger.h
+++ b/include/asterisk/logger.h
@@ -182,7 +182,7 @@ void ast_console_toggle_loglevel(int fd, int level, int state);
#endif
#define AST_LOG_DTMF __LOG_DTMF, _A_
-#define NUMLOGLEVELS 7
+#define NUMLOGLEVELS 32
/*!
* \brief Get the debug level for a module