mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 03:04:19 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.8@307092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1112,20 +1112,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)))
|
if (!(buf = ast_str_thread_get(&log_buf, LOG_BUF_INIT_SIZE)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (AST_RWLIST_EMPTY(&logchannels)) {
|
if (level != __LOG_VERBOSE && AST_RWLIST_EMPTY(&logchannels)) {
|
||||||
/*
|
/*
|
||||||
* we don't have the logger chain configured yet,
|
* we don't have the logger chain configured yet,
|
||||||
* so just log to stdout
|
* so just log to stdout
|
||||||
*/
|
*/
|
||||||
if (level != __LOG_VERBOSE) {
|
int result;
|
||||||
int result;
|
va_start(ap, fmt);
|
||||||
va_start(ap, fmt);
|
result = ast_str_set_va(&buf, BUFSIZ, fmt, ap); /* XXX BUFSIZ ? */
|
||||||
result = ast_str_set_va(&buf, BUFSIZ, fmt, ap); /* XXX BUFSIZ ? */
|
va_end(ap);
|
||||||
va_end(ap);
|
if (result != AST_DYNSTR_BUILD_FAILED) {
|
||||||
if (result != AST_DYNSTR_BUILD_FAILED) {
|
term_filter_escapes(ast_str_buffer(buf));
|
||||||
term_filter_escapes(ast_str_buffer(buf));
|
fputs(ast_str_buffer(buf), stdout);
|
||||||
fputs(ast_str_buffer(buf), stdout);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user