aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-23 18:39:20 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-23 18:39:20 +0000
commitc2bbf5d36eda7d4a5b442996100a5934f353ee05 (patch)
tree72f7f451b79fcb7f70d918d2ba64510f0a434016 /apps
parentf06695b15f7a69b2d1245bcb772cc74d0d4c78a4 (diff)
Don't start the sla thread unless we realy need it
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@272146 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_meetme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index bcd2be476..f632bef5c 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -6615,7 +6615,7 @@ static int sla_load_config(int reload)
/* 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 @@ static int load_config(int reload)
{
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");