wpa_supplicant(fix): restore password bassed on SSID

pull/2310/head
Qingping Hou 8 years ago
parent 886e2d6cb1
commit 48c8470209

@ -24,7 +24,9 @@ function WpaSupplicant:getNetworkList()
for _,network in ipairs(list) do
network.signal_quality = network:getSignalQuality()
local saved_nw = saved_networks:readSetting(network.ssid)
if saved_nw and saved_nw.flags == network.flags then
if saved_nw then
-- TODO: verify saved_nw.flags == network.flags? This will break if user changed the
-- network setting from [WPA-PSK-TKIP+CCMP][WPS][ESS] to [WPA-PSK-TKIP+CCMP][ESS]
network.password = saved_nw.password
end
-- TODO: also verify bssid if it is not set to any

Loading…
Cancel
Save