gluon-core: gluon.util: pass UCI cursor as argument to iterate_radios() instead of using local context
This commit is contained in:
parent
901b122d83
commit
f48d10bdde
@ -51,6 +51,6 @@ local function configure_radio(radio, index, config)
|
||||
configure_client(config.ap, radio, index, suffix)
|
||||
end
|
||||
|
||||
util.iterate_radios(configure_radio)
|
||||
util.iterate_radios(uci, configure_radio)
|
||||
|
||||
uci:save('wireless')
|
||||
|
@ -199,7 +199,7 @@ local function configure_radio(radio, index, config)
|
||||
fixup_wan(radio, index)
|
||||
end
|
||||
|
||||
util.iterate_radios(configure_radio)
|
||||
util.iterate_radios(uci, configure_radio)
|
||||
|
||||
|
||||
if uci:get('system', 'rssid_wlan0') then
|
||||
|
@ -235,7 +235,7 @@ end
|
||||
-- Iterate over all radios defined in UCI calling
|
||||
-- f(radio, index, site.wifiX) for each radio found while passing
|
||||
-- site.wifi24 for 2.4 GHz devices and site.wifi5 for 5 GHz ones.
|
||||
function iterate_radios(f)
|
||||
function iterate_radios(uci, f)
|
||||
local radios = {}
|
||||
|
||||
uci:foreach('wireless', 'wifi-device',
|
||||
|
@ -27,7 +27,7 @@ key.datatype = "wpakey"
|
||||
key.default = uci:get('wireless', primary_iface, "key")
|
||||
|
||||
function f:write()
|
||||
util.iterate_radios(function(radio, index)
|
||||
util.iterate_radios(uci, function(radio, index)
|
||||
local name = "wan_" .. radio
|
||||
|
||||
if enabled.data then
|
||||
|
Loading…
Reference in New Issue
Block a user