Skip to content
Snippets Groups Projects
Commit f2d9cebf authored by Vincent Wiemann's avatar Vincent Wiemann Committed by kb-light
Browse files

Fix util.lua (hidden networks in range)

If there is a hidden network in range it will have a 'nil' SSID value and the match function will result in an error aborting the updater.
This commit also checks for the bssid value so that if the bssid gathering whyever fails it doesn't let the whole updater fail.
parent 1abd1fa9
No related branches found
No related tags found
No related merge requests found
......@@ -16,8 +16,10 @@ function get_available_wifi_networks()
if iw then
local list = iw.scanlist(radio)
for _, net in ipairs(list) do
if net.ssid:match('.*[Ff][Rr][Ee][Ii][Ff][Uu][Nn][Kk].*') then
return radio, net.ssid, net.bssid
if net.ssid and net.bssid then
if net.ssid:match('.*[Ff][Rr][Ee][Ii][Ff][Uu][Nn][Kk].*') then
return radio, net.ssid, net.bssid
end
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment