aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2011-02-08 21:24:57 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2011-02-08 21:24:57 +0000
commit880bfe0cba880be2d68b368b2dee26b4e749b15c (patch)
tree4575fefe026a78f2236155298c262812eb4c6010
parent56f9835d92a9503b449ae4f9ec4cdec4a17d57f9 (diff)
Merged revisions 307092 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r307092 | qwell | 2011-02-08 15:24:01 -0600 (Tue, 08 Feb 2011) | 9 lines Fix issue with verbose messages not showing on remote console. This code was reworked recently, and since the logchannel list hadn't been created yet at this point, and it was a verbose message, it was being dropped on the floor. Now it'll continue on to where it should be handled. (closes issue #18580) Reported by: pabelanger ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@307097 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/logger.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/main/logger.c b/main/logger.c
index f9032959e..63facaaae 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -1103,20 +1103,18 @@ void ast_log(int level, const char *file, int line, const char *function, const
if (!(buf = ast_str_thread_get(&log_buf, LOG_BUF_INIT_SIZE)))
return;
- if (AST_RWLIST_EMPTY(&logchannels)) {
+ if (level != __LOG_VERBOSE && AST_RWLIST_EMPTY(&logchannels)) {
/*
* we don't have the logger chain configured yet,
* so just log to stdout
*/
- if (level != __LOG_VERBOSE) {
- int result;
- va_start(ap, fmt);
- result = ast_str_set_va(&buf, BUFSIZ, fmt, ap); /* XXX BUFSIZ ? */
- va_end(ap);
- if (result != AST_DYNSTR_BUILD_FAILED) {
- term_filter_escapes(ast_str_buffer(buf));
- fputs(ast_str_buffer(buf), stdout);
- }
+ int result;
+ va_start(ap, fmt);
+ result = ast_str_set_va(&buf, BUFSIZ, fmt, ap); /* XXX BUFSIZ ? */
+ va_end(ap);
+ if (result != AST_DYNSTR_BUILD_FAILED) {
+ term_filter_escapes(ast_str_buffer(buf));
+ fputs(ast_str_buffer(buf), stdout);
}
return;
}