[asterisk-commits] twilson: trunk r272146 - /trunk/apps/app_meetme.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 23 13:39:24 CDT 2010


Author: twilson
Date: Wed Jun 23 13:39:20 2010
New Revision: 272146

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=272146
Log:
Don't start the sla thread unless we realy need it

Modified:
    trunk/apps/app_meetme.c

Modified: trunk/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_meetme.c?view=diff&rev=272146&r1=272145&r2=272146
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Wed Jun 23 13:39:20 2010
@@ -6615,7 +6615,7 @@
 
 	/* Even if we don't have any stations, we may after a reload and we need to
 	 * be able to process the SLA_EVENT_RELOAD event in that case */
-	if (!reload) {
+	if (sla.thread == AST_PTHREADT_NULL && (!AST_LIST_EMPTY(&sla_stations) || !AST_LIST_EMPTY(&sla_trunks))) {
 		ast_pthread_create(&sla.thread, NULL, sla_thread, NULL);
 	}
 
@@ -6701,7 +6701,7 @@
 {
 	load_config_meetme();
 
-	if (reload) {
+	if (reload && sla.thread != AST_PTHREADT_NULL) {
 		sla_queue_event(SLA_EVENT_RELOAD);
 		ast_log(LOG_NOTICE, "A reload of the SLA configuration has been requested "
 			"and will be completed when the system is idle.\n");




More information about the asterisk-commits mailing list