diff options
author | Richard Mudgett <rmudgett@digium.com> | 2013-09-04 16:03:14 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2013-09-04 16:03:14 +0000 |
commit | 2ce0c9f4a00c69305b3158af8a1f2f67f9e3d49c (patch) | |
tree | 51bf5e7ce83db7dbb959bc4f0c6e7e84b7c132c1 /channels/chan_misdn.c | |
parent | 1be7514a59b78f6510b8651685068a3a7111ac17 (diff) |
chan_misdn: Fix misdn debug output printed with arbitrary verbose levels.
Fix the misdn debug output to remote consoles. chan_misdn uses
ast_console_puts() which doesn't know about verbose levels. Better to use
ast_verbose() instead. Without this patch the misdn debug messages are
appended to the verbose level which ever was set by the message sent to
the console before, i.e. any undefined level.
(closes issue AST-1218)
Reported by: Guenther Kelleter
Patches:
misdnlog.patch (license #6372) patch uploaded by Guenther Kelleter
........
Merged revisions 398235 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398236 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398237 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r-- | channels/chan_misdn.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index 85edd8e60..29274e743 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -12770,8 +12770,7 @@ static void chan_misdn_log(int level, int port, char *tmpl, ...) } else if (misdn_debug_only[port] ? (level == 1 && misdn_debug[port]) || level == misdn_debug[port] : level <= misdn_debug[port]) { - ast_console_puts(port_buf); - ast_console_puts(buf); + ast_verbose("%s%s", port_buf, buf); } if (level <= misdn_debug[0] && !ast_strlen_zero(global_tracefile)) { @@ -12783,12 +12782,7 @@ static void chan_misdn_log(int level, int port, char *tmpl, ...) fp = fopen(global_tracefile, "a+"); if (!fp) { - ast_console_puts("Error opening Tracefile: [ "); - ast_console_puts(global_tracefile); - ast_console_puts(" ] "); - - ast_console_puts(strerror(errno)); - ast_console_puts("\n"); + ast_verbose("Error opening Tracefile: [ %s ] %s\n", global_tracefile, strerror(errno)); return; } |