mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix:(wpa_supplicant): show error from set_network operations
This commit is contained in:
committed by
Frans de Jonge
parent
c34e04e081
commit
d478eaeabe
@@ -49,8 +49,16 @@ function WpaSupplicant:authenticateNetwork(network)
|
||||
nw_id, err = wcli:addNetwork()
|
||||
if err then return false, err end
|
||||
|
||||
wcli:setNetwork(nw_id, "ssid", network.ssid)
|
||||
wcli:setNetwork(nw_id, "psk", network.password)
|
||||
local re = wcli:setNetwork(nw_id, "ssid", network.ssid)
|
||||
if re == 'FAIL' then
|
||||
wcli:removeNetwork(nw_id)
|
||||
return false, _("Failed to set network SSID.")
|
||||
end
|
||||
re = wcli:setNetwork(nw_id, "psk", network.password)
|
||||
if re == 'FAIL' then
|
||||
wcli:removeNetwork(nw_id)
|
||||
return false, _("Failed to set network password.")
|
||||
end
|
||||
wcli:enableNetworkByID(nw_id)
|
||||
|
||||
wcli:attach()
|
||||
@@ -58,7 +66,7 @@ function WpaSupplicant:authenticateNetwork(network)
|
||||
local failure_cnt = 0
|
||||
local max_retry = 30
|
||||
local info = InfoMessage:new{text = _("Authenticating…")}
|
||||
local re, msg
|
||||
local msg
|
||||
UIManager:show(info)
|
||||
UIManager:forceRePaint()
|
||||
while cnt < max_retry do
|
||||
|
||||
Reference in New Issue
Block a user