- Use new synchronized change-and-save-config methods

to eliminate races with ReadConfigJob
This commit is contained in:
zzz
2012-01-18 01:54:34 +00:00
parent 9755338f73
commit 95329803a9
20 changed files with 162 additions and 135 deletions

View File

@@ -53,18 +53,11 @@ public class ConfigAdvancedHandler extends FormHandler {
return;
}
for (Map.Entry e : props.entrySet()) {
String key = (String) e.getKey();
String val = (String) e.getValue();
_context.router().setConfigSetting(key, val);
for (Object key : props.keySet()) {
unsetKeys.remove(key);
}
for (String unsetKey : unsetKeys) {
_context.router().removeConfigSetting(unsetKey);
}
boolean saved = _context.router().saveConfig();
boolean saved = _context.router().saveConfig(props, unsetKeys);
if (saved)
addFormNotice(_("Configuration saved successfully"));
else