diff options
author | Dirk Brenken <dev@brenken.org> | 2018-04-10 21:38:07 +0200 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2018-04-10 21:38:07 +0200 |
commit | f3a10bb59b7782c5094f595d2b122ba82edf3e48 (patch) | |
tree | fa110fc6b4457f11999fbc9b249532fdeabdf51e /applications/luci-app-mwan3/luasrc/controller/mwan3.lua | |
parent | f7f5395f1c6c1cb3913ca12b1efd9bbdf6201f15 (diff) |
luci-app-mwan3: bugfix
* two more luci.model.uci fixes for #1743
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-mwan3/luasrc/controller/mwan3.lua')
-rw-r--r-- | applications/luci-app-mwan3/luasrc/controller/mwan3.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua index d8fba79c79..d5fc4a3ede 100644 --- a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua +++ b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua @@ -85,7 +85,8 @@ function diagnosticsData(interface, task) function getInterfaceNumber(interface) local number = 0 local interfaceNumber - uci.cursor():foreach("mwan3", "interface", + local uci = require "luci.model.uci".cursor() + uci:foreach("mwan3", "interface", function (section) number = number+1 if section[".name"] == interface then @@ -130,7 +131,7 @@ function diagnosticsData(interface, task) local results = "" local number = getInterfaceNumber(interface) - local uci = uci.cursor(nil, "/var/state") + local uci = require "luci.model.uci".cursor(nil, "/var/state") local device = uci:get("network", interface, "ifname") luci.http.prepare_content("text/plain") |