summaryrefslogtreecommitdiff
path: root/apps/app_meetme.c
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2012-01-09 15:40:16 +0000
committerKinsey Moore <kmoore@digium.com>2012-01-09 15:40:16 +0000
commitc04f4d72fde1bdbc295ca963d51c1b8ace4d9492 (patch)
tree23ac8f3d7e70f7b77713a0e35973669c74be5a30 /apps/app_meetme.c
parentb35a3a5c4a74a5733fce6a809d5197109a1fdd93 (diff)
Prevent SLA settings from getting wiped out on reload
If SLA was reloaded without the config file being changed, current settings got wiped out before the SLA reload code decided it wasn't going to reload the file since nothing was changed. Moving the settings reset later in the reload process fixes this. (closes issue AST-744) ........ Merged revisions 350023 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350024 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_meetme.c')
-rw-r--r--apps/app_meetme.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 6421f3b98..956f95c52 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -6093,19 +6093,6 @@ static void sla_check_reload(void)
return;
}
- /* We need to actually delete the previous versions of trunks and stations now */
- AST_RWLIST_TRAVERSE_SAFE_BEGIN(&sla_stations, station, entry) {
- AST_RWLIST_REMOVE_CURRENT(entry);
- ast_free(station);
- }
- AST_RWLIST_TRAVERSE_SAFE_END;
-
- AST_RWLIST_TRAVERSE_SAFE_BEGIN(&sla_trunks, trunk, entry) {
- AST_RWLIST_REMOVE_CURRENT(entry);
- ast_free(trunk);
- }
- AST_RWLIST_TRAVERSE_SAFE_END;
-
/* yay */
sla_load_config(1);
sla.reload = 0;
@@ -7004,6 +6991,24 @@ static int sla_load_config(int reload)
return 0;
}
+ if (reload) {
+ struct sla_station *station;
+ struct sla_trunk *trunk;
+
+ /* We need to actually delete the previous versions of trunks and stations now */
+ AST_RWLIST_TRAVERSE_SAFE_BEGIN(&sla_stations, station, entry) {
+ AST_RWLIST_REMOVE_CURRENT(entry);
+ ast_free(station);
+ }
+ AST_RWLIST_TRAVERSE_SAFE_END;
+
+ AST_RWLIST_TRAVERSE_SAFE_BEGIN(&sla_trunks, trunk, entry) {
+ AST_RWLIST_REMOVE_CURRENT(entry);
+ ast_free(trunk);
+ }
+ AST_RWLIST_TRAVERSE_SAFE_END;
+ }
+
if ((val = ast_variable_retrieve(cfg, "general", "attemptcallerid")))
sla.attempt_callerid = ast_true(val);