[svn-commits] rmudgett: branch certified-13.1 r430030 - in /certified/branches/13.1: ./ inc...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Dec 22 14:50:28 CST 2014
Author: rmudgett
Date: Mon Dec 22 14:50:17 2014
New Revision: 430030
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=430030
Log:
queue_log: Post QUEUESTART entry when Asterisk fully boots.
The QUEUESTART log entry has historically acted like a fully booted event
for the queue_log file. When the QUEUESTART entry was posted to the log
was broken by the change made by ASTERISK-15863.
* Made post the QUEUESTART queue_log entry when Asterisk fully boots.
This restores the intent of that log entry and happens after realtime has
had a chance to load.
AST-1444 #close
Reported by: Denis Martinez
Review: https://reviewboard.asterisk.org/r/4282/
........
Merged revisions 430009 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 430010 from http://svn.asterisk.org/svn/asterisk/branches/13
Modified:
certified/branches/13.1/ (props changed)
certified/branches/13.1/include/asterisk/_private.h
certified/branches/13.1/main/asterisk.c
certified/branches/13.1/main/logger.c
Propchange: certified/branches/13.1/
('branch-12-blocked' removed)
Propchange: certified/branches/13.1/
('branch-12-merged' removed)
Propchange: certified/branches/13.1/
------------------------------------------------------------------------------
--- branch-13-merged (original)
+++ branch-13-merged Mon Dec 22 14:50:17 2014
@@ -1,1 +1,1 @@
-/branches/13:429128-429222,429224-429246,429407,429409,429433,429477,429497,429540,429571,429739,429741,429761,429829
+/branches/13:429128-429222,429224-429246,429407,429409,429433,429477,429497,429540,429571,429739,429741,429761,429829,430010
Modified: certified/branches/13.1/include/asterisk/_private.h
URL: http://svnview.digium.com/svn/asterisk/certified/branches/13.1/include/asterisk/_private.h?view=diff&rev=430030&r1=430029&r2=430030
==============================================================================
--- certified/branches/13.1/include/asterisk/_private.h (original)
+++ certified/branches/13.1/include/asterisk/_private.h Mon Dec 22 14:50:17 2014
@@ -19,6 +19,7 @@
int load_pbx(void); /*!< Provided by pbx.c */
int init_logger(void); /*!< Provided by logger.c */
void close_logger(void); /*!< Provided by logger.c */
+void logger_queue_start(void); /*!< Provided by logger.c */
void clean_time_zones(void); /*!< Provided by localtime.c */
int ast_term_init(void); /*!< Provided by term.c */
int astdb_init(void); /*!< Provided by db.c */
Modified: certified/branches/13.1/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/13.1/main/asterisk.c?view=diff&rev=430030&r1=430029&r2=430030
==============================================================================
--- certified/branches/13.1/main/asterisk.c (original)
+++ certified/branches/13.1/main/asterisk.c Mon Dec 22 14:50:17 2014
@@ -4592,6 +4592,8 @@
ast_verb(0, COLORIZE_FMT "\n", COLORIZE(COLOR_BRGREEN, 0, "Asterisk Ready."));
+ logger_queue_start();
+
if (ast_opt_console) {
/* Console stuff now... */
/* Register our quit function */
Modified: certified/branches/13.1/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/13.1/main/logger.c?view=diff&rev=430030&r1=430029&r2=430030
==============================================================================
--- certified/branches/13.1/main/logger.c (original)
+++ certified/branches/13.1/main/logger.c Mon Dec 22 14:50:17 2014
@@ -241,8 +241,6 @@
AST_THREADSTORAGE(log_buf);
#define LOG_BUF_INIT_SIZE 256
-static void logger_queue_init(void);
-
static void make_components(struct logchannel *chan)
{
char *w;
@@ -560,20 +558,8 @@
return;
}
if (!queuelog_init) {
- AST_RWLIST_WRLOCK(&logchannels);
- if (!queuelog_init) {
- /*
- * We have delayed initializing the queue logging system so
- * preloaded realtime modules can get up. We must initialize
- * now since someone is trying to log something.
- */
- logger_queue_init();
- queuelog_init = 1;
- AST_RWLIST_UNLOCK(&logchannels);
- ast_queue_log("NONE", "NONE", "NONE", "QUEUESTART", "%s", "");
- } else {
- AST_RWLIST_UNLOCK(&logchannels);
- }
+ /* We must initialize now since someone is trying to log something. */
+ logger_queue_start();
}
if (ast_check_realtime("queue_log")) {
@@ -1397,6 +1383,30 @@
}
}
+/*!
+ * \brief Start the ast_queue_log() logger.
+ *
+ * \note Called when the system is fully booted after startup
+ * so preloaded realtime modules can get up.
+ *
+ * \return Nothing
+ */
+void logger_queue_start(void)
+{
+ /* Must not be called before the logger is initialized. */
+ ast_assert(logger_initialized);
+
+ AST_RWLIST_WRLOCK(&logchannels);
+ if (!queuelog_init) {
+ logger_queue_init();
+ queuelog_init = 1;
+ AST_RWLIST_UNLOCK(&logchannels);
+ ast_queue_log("NONE", "NONE", "NONE", "QUEUESTART", "%s", "");
+ } else {
+ AST_RWLIST_UNLOCK(&logchannels);
+ }
+}
+
int init_logger(void)
{
/* auto rotate if sig SIGXFSZ comes a-knockin */
More information about the svn-commits
mailing list