[svn-commits] jrose: trunk r322070 - in /trunk: ./ include/asterisk/logger.h main/asterisk.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Jun 6 14:15:15 CDT 2011
Author: jrose
Date: Mon Jun 6 14:15:10 2011
New Revision: 322070
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=322070
Log:
Merged revisions 322069 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r322069 | jrose | 2011-06-06 14:07:56 -0500 (Mon, 06 Jun 2011) | 8 lines
Fixes level toggling for logger set levels since it was reversed
(closes issue #17850)
Reported by: Luke H
Tested by: jrose, Luke H
Review: https://reviewboard.asterisk.org/r/1244/
........
Modified:
trunk/ (props changed)
trunk/include/asterisk/logger.h
trunk/main/asterisk.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/include/asterisk/logger.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/logger.h?view=diff&rev=322070&r1=322069&r2=322070
==============================================================================
--- trunk/include/asterisk/logger.h (original)
+++ trunk/include/asterisk/logger.h Mon Jun 6 14:15:10 2011
@@ -98,7 +98,10 @@
void ast_console_toggle_mute(int fd, int silent);
/*!
- * \since 1.6.1
+ * \brief enables or disables logging of a specified level to the console
+ * fd specifies the index of the console receiving the level change
+ * level specifies the index of the logging level being toggled
+ * state indicates whether logging will be on or off (0 for off, 1 for on)
*/
void ast_console_toggle_loglevel(int fd, int level, int state);
Modified: trunk/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/asterisk.c?view=diff&rev=322070&r1=322069&r2=322070
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Mon Jun 6 14:15:10 2011
@@ -1087,12 +1087,19 @@
return res;
}
+/*!
+ * \brief enable or disable a logging level to a specified console
+ */
void ast_console_toggle_loglevel(int fd, int level, int state)
{
int x;
for (x = 0;x < AST_MAX_CONNECTS; x++) {
if (fd == consoles[x].fd) {
- consoles[x].levels[level] = state;
+ /*
+ * Since the logging occurs when levels are false, set to
+ * flipped iinput because this function accepts 0 as off and 1 as on
+ */
+ consoles[x].levels[level] = state ? 0 : 1;
return;
}
}
More information about the svn-commits
mailing list