[asterisk-commits] twilson: trunk r265467 - in /trunk: doc/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 24 17:22:00 CDT 2010


Author: twilson
Date: Mon May 24 17:21:58 2010
New Revision: 265467

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=265467
Log:
Merge the rest of the FullyBooted patch

Modified:
    trunk/doc/manager_1_1.txt
    trunk/main/asterisk.c
    trunk/main/manager.c

Modified: trunk/doc/manager_1_1.txt
URL: http://svnview.digium.com/svn/asterisk/trunk/doc/manager_1_1.txt?view=diff&rev=265467&r1=265466&r2=265467
==============================================================================
--- trunk/doc/manager_1_1.txt (original)
+++ trunk/doc/manager_1_1.txt Mon May 24 17:21:58 2010
@@ -314,6 +314,22 @@
 * NEW EVENTS
 ------------
 
+- Event: FullyBooted
+	Modules: loader.c
+	Purpose:
+		It is handy to have a single event notification for when all Asterisk
+		modules have been loaded--especially for situations like running
+		automated tests. This event will fire 1) immediately upon all modules
+		loading or 2) upon connection to the AMI interface if the modules have
+		already finished loading before the connection was made. This ensures
+		that a user will never miss getting a FullyBooted event. In vary rare
+		circumstances, it might be possible to get two copies of the message
+		if the AMI connection is made right as the modules finish loading.
+	Example:
+		Event: FullyBooted
+		Privilege: system,all
+		Status: Fully Booted
+
 - Event: Transfer
 	Modules: res_features, chan_sip
 	Purpose:

Modified: trunk/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/asterisk.c?view=diff&rev=265467&r1=265466&r2=265467
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Mon May 24 17:21:58 2010
@@ -3723,6 +3723,7 @@
 		sig_alert_pipe[0] = sig_alert_pipe[1] = -1;
 
 	ast_set_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED);
+	manager_event(EVENT_FLAG_SYSTEM, "FullyBooted", "Status: Fully Booted\r\n");
 
 	ast_process_pending_reloads();
 

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=265467&r1=265466&r2=265467
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Mon May 24 17:21:58 2010
@@ -2740,6 +2740,9 @@
 		ast_verb(2, "%sManager '%s' logged on from %s\n", (s->session->managerid ? "HTTP " : ""), s->session->username, ast_inet_ntoa(s->session->sin.sin_addr));
 	}
 	astman_send_ack(s, m, "Authentication accepted");
+	if (ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) {
+		manager_event(EVENT_FLAG_SYSTEM, "FullyBooted", "Status: Fully Booted\r\n");
+	}
 	return 0;
 }
 




More information about the asterisk-commits mailing list