From f2d9cebf2adcea96d7daaecd5a46e50c2f5b5b56 Mon Sep 17 00:00:00 2001 From: Vincent Wiemann <webmaster@codefetch.de> Date: Tue, 25 Oct 2016 03:55:03 +0200 Subject: [PATCH] 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. --- .../luasrc/usr/lib/lua/autoupdater-wifi-fallback/util.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ffho/ffho-autoupdater-wifi-fallback/luasrc/usr/lib/lua/autoupdater-wifi-fallback/util.lua b/ffho/ffho-autoupdater-wifi-fallback/luasrc/usr/lib/lua/autoupdater-wifi-fallback/util.lua index 4e7e5f3..d17be44 100644 --- a/ffho/ffho-autoupdater-wifi-fallback/luasrc/usr/lib/lua/autoupdater-wifi-fallback/util.lua +++ b/ffho/ffho-autoupdater-wifi-fallback/luasrc/usr/lib/lua/autoupdater-wifi-fallback/util.lua @@ -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 -- GitLab