[asterisk-commits] kmoore: branch 10 r350024 - in /branches/10: ./ apps/app_meetme.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 9 09:39:34 CST 2012


Author: kmoore
Date: Mon Jan  9 09:39:31 2012
New Revision: 350024

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=350024
Log:
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

Modified:
    branches/10/   (props changed)
    branches/10/apps/app_meetme.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/apps/app_meetme.c?view=diff&rev=350024&r1=350023&r2=350024
==============================================================================
--- branches/10/apps/app_meetme.c (original)
+++ branches/10/apps/app_meetme.c Mon Jan  9 09:39:31 2012
@@ -6064,19 +6064,6 @@
 		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;
@@ -6975,6 +6962,24 @@
 		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);
 




More information about the asterisk-commits mailing list