aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorjrose <jrose@f38db490-d61c-443f-a65b-d21fe96a405b>2011-06-06 19:15:10 +0000
committerjrose <jrose@f38db490-d61c-443f-a65b-d21fe96a405b>2011-06-06 19:15:10 +0000
commit315881adf734064f92671290451905480c9bb02f (patch)
treeff194970867860a6d9745cf3804b33dea3dc2c27 /main
parent37e212e99fc2152f50b85758950e7a58decde405 (diff)
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 ASTERISK-17850) Reported by: Luke H Tested by: jrose, Luke H Review: https://reviewboard.asterisk.org/r/1244/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@322070 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/asterisk.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index d9e3868c6..7b93294ca 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -1087,12 +1087,19 @@ int ast_safe_system(const char *s)
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;
}
}