summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2018-04-11 08:53:16 +0300
committerGitHub <noreply@github.com>2018-04-11 08:53:16 +0300
commitd4886818ce420d30c0ad11e30ea91daf95195f93 (patch)
tree3b16763b1b5793cf939aa5786f1188db18cb2bac /applications
parentb2eceb0bccff967bd371cd266148e7cac5eae439 (diff)
parentf3a10bb59b7782c5094f595d2b122ba82edf3e48 (diff)
Merge pull request #1744 from dibdot/mwan-fix
luci-app-mwan3: bugfix
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-mwan3/luasrc/controller/mwan3.lua5
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 d8fba79c7..d5fc4a3ed 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")