summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/status_captiveportal.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/local/www/status_captiveportal.php b/usr/local/www/status_captiveportal.php
index ab0e20d..7a66011 100755
--- a/usr/local/www/status_captiveportal.php
+++ b/usr/local/www/status_captiveportal.php
@@ -61,10 +61,13 @@ function clientcmp($a, $b) {
}
$cpdb = array();
-if (file_exists("{$g['vardb_path']}/captiveportal.db"))
- $cpcontents = file("{$g['vardb_path']}/captiveportal.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
-else
+if (file_exists("{$g['vardb_path']}/captiveportal.db")) {
+ $captiveportallck = lock('captiveportal');
+ $cpcontents = file("/var/db/captiveportal.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
+ unlock($captiveportallck);
+} else {
$cpcontents = array();
+}
$concurrent = count($cpcontents);
OpenPOWER on IntegriCloud