From: Jo-Philipp Wich Date: Sat, 26 Sep 2009 18:53:01 +0000 (+0000) Subject: modules/admin-full: prevent crash in wifi model if no tx power list is available X-Git-Tag: 0.10.0~1128 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=37b3416c5d3eb6d3f9e3ca776e8d7afb2caf33e2;ds=sidebyside modules/admin-full: prevent crash in wifi model if no tx power list is available --- diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua index 613319bfc..63c23441e 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua @@ -25,8 +25,8 @@ local tx_powers = nil m.uci:foreach("wireless", "wifi-iface", function(s) - if s.device == arg[1] and s.ifname and not iw then - iw = luci.sys.wifi.getiwinfo(s.ifname) + if s.device == arg[1] and not iw then + iw = luci.sys.wifi.getiwinfo(s.ifname or s.device) tx_powers = iw.txpwrlist or { } end end)