From: Steven Barth Date: Fri, 6 Jun 2008 21:49:17 +0000 (+0000) Subject: * Fixed a bug in Luci-Splash X-Git-Tag: 0.8.0~868 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0092df3d17247986be0cb5f43f49547ce9c08bc4;p=oweals%2Fluci.git * Fixed a bug in Luci-Splash --- diff --git a/applications/luci-splash/root/usr/sbin/luci-splash b/applications/luci-splash/root/usr/sbin/luci-splash index fc3a0c8da..72456c01e 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