Index: squeezeplay_fab4/share/applets/SetupNetworking/SetupNetworkingApplet.lua =================================================================== --- squeezeplay_fab4/share/applets/SetupNetworking/SetupNetworkingApplet.lua (revision 5317) +++ squeezeplay_fab4/share/applets/SetupNetworking/SetupNetworkingApplet.lua (revision 5419) @@ -173,8 +173,8 @@ -- select wireless region function _wirelessRegion(self, wlan) - -- skip region if already set and not in setup mode - if self:getSettings()['region'] and self.mode ~= "setup" then + -- skip region if already set and not in setup mode, or if wlan is nil + if (self:getSettings()['region'] and self.mode ~= "setup") or not wlan then return _connectionType(self) end @@ -1174,7 +1174,8 @@ Task("networkFailed", self, _connectFailedTask):addTask(iface, ssid) -- Message based on failure type - local helpText = self:string("NETWORK_CONNECTION_PROBLEM_HELP", tostring(self.psk)) + local password = self.psk + local helpText = self:string("NETWORK_CONNECTION_PROBLEM_HELP", tostring(password)) -- popup failure local window = Window("error", self:string('NETWORK_CANT_CONNECT'), 'setuptitle') @@ -1182,7 +1183,7 @@ local menu = SimpleMenu("menu", { { - text = self:string("NETWORK_TRY_PASSWORD"), + text = self:string("NETWORK_TRY_AGAIN"), sound = "WINDOWHIDE", callback = function() _networkScanAgain(self, iface, true) @@ -1199,7 +1200,10 @@ }) - window:addWidget(Textarea("help_text", helpText)) + if password and password ~= "" then + window:addWidget(Textarea("help_text", helpText)) + end + window:addWidget(menu) self:tieAndShowWindow(window) Index: squeezeplay_squeezeos/share/jive/net/Networking.lua =================================================================== --- squeezeplay_squeezeos/share/jive/net/Networking.lua (revision 5317) +++ squeezeplay_squeezeos/share/jive/net/Networking.lua (revision 5419) @@ -976,7 +976,12 @@ local iface = self.interface if self.wireless then ssid = string.gsub(ssid, "[ \t]", "_") - iface = iface .. "=" .. ssid + -- Bug 11840: Allow special chars in SSID + -- First escape '\' and '"' ... + ssid = string.gsub(ssid, '\\', '\\\\') + ssid = string.gsub(ssid, '"', '\\"') + -- ... then quote SSID for ifup call + iface = '"' .. iface .. "=" .. ssid .. '"' end log:info("ifup ", iface) @@ -994,12 +999,18 @@ function _ifDown(self) -- bring interface down - local iface = self.interface - local active = self:_ifstate() if active then - iface = iface .. "=" .. active + local iface = self.interface + if self.wireless then + -- Bug 11840: Allow special chars in SSID + -- First escape '\' and '"' ... + local ssid = string.gsub(active, '\\', '\\\\') + ssid = string.gsub(ssid, '"', '\\"') + -- ... then quote SSID for ifdown call + iface = '"' .. iface .. "=" .. ssid .. '"' + end log:info("ifdown ", iface) self:_ifUpDown("/sbin/ifdown " .. iface .. " -f")