libs/sys: fix getiwinfo() for "radioX.networkY" notation if the target network is not yet committed to uci

This commit is contained in:
Jo-Philipp Wich 2012-08-14 12:45:12 +00:00
parent 6b128c0281
commit 2c844d42d8

View file

@ -836,6 +836,7 @@ function wifi.getiwinfo(ifname)
local u = uci.cursor_state()
local d, n = ifname:match("^(%w+)%.network(%d+)")
if d and n then
ifname = d
n = tonumber(n)
u:foreach("wireless", "wifi-iface",
function(s)