diff options
author | Steven Barth <steven@midlink.org> | 2008-06-06 21:49:17 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-06-06 21:49:17 +0000 |
commit | 0092df3d17247986be0cb5f43f49547ce9c08bc4 (patch) | |
tree | 208115119d5a43ec101f07e3bd410b623a2ffce3 /applications/luci-splash/root/usr | |
parent | 37caa67aaa34a3d5636e0e15079bb329c4804684 (diff) |
* Fixed a bug in Luci-Splash
Diffstat (limited to 'applications/luci-splash/root/usr')
-rw-r--r-- | applications/luci-splash/root/usr/sbin/luci-splash | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/applications/luci-splash/root/usr/sbin/luci-splash b/applications/luci-splash/root/usr/sbin/luci-splash index fc3a0c8da5..72456c01e6 100644 --- a/applications/luci-splash/root/usr/sbin/luci-splash +++ b/applications/luci-splash/root/usr/sbin/luci-splash @@ -73,15 +73,20 @@ end -- Remove a lease from state and invoke remove_rule function remove_lease(mac) mac = mac:lower() + local del = {} uci.foreach("luci_splash", "lease", function (section) if section.mac:lower() == mac then - remove_rule(mac) - uci.delete("luci_splash", section[".name"]) + table.insert(del, section[".name"]) end end) + for i,j in ipairs(del) do + remove_rule(j) + uci.delete("luci_splash", j) + end + uci.save() end |