summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-05-11 18:43:07 +0000
committerErmal Luçi <eri@pfsense.org>2009-05-11 18:43:07 +0000
commitc1ba39b21987bfb6e4032c0f5618baf9cc6d630c (patch)
tree91774fd83c87678c65f862161dcefc666f98f092 /etc
parent96ccfe378887414c16d99896d5b4aefd68b617b7 (diff)
downloadpfsense-c1ba39b21987bfb6e4032c0f5618baf9cc6d630c.zip
pfsense-c1ba39b21987bfb6e4032c0f5618baf9cc6d630c.tar.gz
Some more locking fixes.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/config.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 9bf18dc..ab3a9ae 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -258,6 +258,7 @@ function parse_config($parse = false) {
if(is_null($config)) {
unlock($lockkey);
parse_config(true);
+ $lockkey = lock('config');
}
} else {
if(!file_exists($g['conf_path'] . "/config.xml")) {
@@ -686,7 +687,9 @@ function config_restore($conffile) {
backup_config();
copy($conffile, "{$g['cf_conf_path']}/config.xml");
+ unlock($lockkey);
$config = parse_config(true);
+ $lockkey = lock('config');
write_config("Reverted to " . array_pop(explode("/", $conffile)) . ".", false);
conf_mount_ro();
OpenPOWER on IntegriCloud