0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 11:03:48 +01:00

Not specifying bssid in wireless config and removing previous configs with same ssid

This commit is contained in:
peteruithoven 2014-02-27 15:14:30 +01:00
parent 8f6fc9dc99
commit 00340cb253

View File

@ -228,7 +228,7 @@ function M.createConfigFromScanInfo(info, passphrase, disabled)
network = M.NET, network = M.NET,
device = 'radio0', device = 'radio0',
ssid = info.ssid, ssid = info.ssid,
bssid = info.bssid, --bssid = info.bssid,
encryption = M.mapEncryptionType(info.encryption), encryption = M.mapEncryptionType(info.encryption),
mode = mode, mode = mode,
} }
@ -236,8 +236,9 @@ function M.createConfigFromScanInfo(info, passphrase, disabled)
apconfig.disabled = disabled ~= nil and disabled and 1 or 0 apconfig.disabled = disabled ~= nil and disabled and 1 or 0
uci:foreach('wireless', 'wifi-iface', function(s) uci:foreach('wireless', 'wifi-iface', function(s)
if s.bssid == info.bssid then --if s.bssid == info.bssid then
log:debug("removing old wireless config for net '" .. s.ssid .. "(bssid: " .. s.bssid .. ")'") if s.ssid == info.ssid then
log:debug("removing old wireless config for net '" .. s.ssid .. "'")
uci:delete('wireless', s['.name']) uci:delete('wireless', s['.name'])
-- return false --keep looking, just in case multiple entries with this bssid exist -- return false --keep looking, just in case multiple entries with this bssid exist
end end