[asterisk-commits] rmudgett: branch 1.8 r398235 - /branches/1.8/channels/chan_misdn.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 4 10:54:40 CDT 2013
Author: rmudgett
Date: Wed Sep 4 10:54:37 2013
New Revision: 398235
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398235
Log:
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
Modified:
branches/1.8/channels/chan_misdn.c
Modified: branches/1.8/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_misdn.c?view=diff&rev=398235&r1=398234&r2=398235
==============================================================================
--- branches/1.8/channels/chan_misdn.c (original)
+++ branches/1.8/channels/chan_misdn.c Wed Sep 4 10:54:37 2013
@@ -12655,8 +12655,7 @@
} 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)) {
@@ -12668,12 +12667,7 @@
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;
}
More information about the asterisk-commits
mailing list