summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-12-18 09:21:47 +0000
committerErmal <eri@pfsense.org>2012-12-18 09:21:47 +0000
commita19ea4786ba93db064be8ce64dbc387b63455762 (patch)
tree81246c1d379e479c15b05fb0572a637ccd56880e /etc/inc
parent26ee5aafa2787c9249b50a57a7ab9977e6303fe8 (diff)
downloadpfsense-a19ea4786ba93db064be8ce64dbc387b63455762.zip
pfsense-a19ea4786ba93db064be8ce64dbc387b63455762.tar.gz
Correct field name and add an index for ip
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/captiveportal.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 041f1c2..9f7d8e0 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -1218,8 +1218,9 @@ function captiveportal_opendb() {
$errormsg = "";
$DB = @sqlite_open("{$g['vardb_path']}/captiveportal{$cpzone}.db");
if (@sqlite_exec($DB, "CREATE TABLE captiveportal (allow_time INTEGER, ruleno INTEGER, ip TEXT, mac TEXT, username TEXT, sessionid TEXT, bpassword TEXT, session_timeout INTEGER, idle_timeout INTEGER, session_terminate_time INTEGER) ", $errormsg)) {
- @sqlite_exec($DB, "CREATE UNIQUE INDEX idx_active ON captiveportal (sessionid, user)");
- @sqlite_exec($DB, "CREATE INDEX user ON captiveportal (user)");
+ @sqlite_exec($DB, "CREATE UNIQUE INDEX idx_active ON captiveportal (sessionid, username)");
+ @sqlite_exec($DB, "CREATE INDEX user ON captiveportal (username)");
+ @sqlite_exec($DB, "CREATE INDEX ip ON captiveportal (ip)");
@sqlite_exec($DB, "CREATE INDEX starttime ON captiveportal (allow_time)");
@sqlite_exec($DB, "CREATE INDEX serviceid ON captiveportal (serviceid)");
} else
OpenPOWER on IntegriCloud