From b90d0e2daa3201f2fdab86d7f8c5fc604bbf4315 Mon Sep 17 00:00:00 2001 From: Blake Kaplan Date: Thu, 16 Feb 2012 15:42:25 +0100 Subject: [PATCH] Bug 728029 - Try to force a connection to Mozilla Guest, even if it's not broadcasting. r=cjones --HG-- extra : rebase_source : 15bd53e8bec6d63920b1a990956c744750cca914 --- dom/wifi/nsWifiWorker.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dom/wifi/nsWifiWorker.js b/dom/wifi/nsWifiWorker.js index e1d48d2f6f8..be83da2cf62 100644 --- a/dom/wifi/nsWifiWorker.js +++ b/dom/wifi/nsWifiWorker.js @@ -837,18 +837,19 @@ function nsWifiWorker() { debug("Network Mozilla exists, but is encrypted"); net = null; } + + var config = Object.create(null); if (!net) { name = "Mozilla Guest"; net = self.networks[name]; if (!net || (net.flags && net.flags !== "[IBSS]")) { - debug("Network Mozilla Guest doesn't exist or is encrypted"); - return; + debug("Can't find either network, trying to force 'Mozilla Guest'"); + config.scan_ssid = 1; } } - var config = Object.create(null); - config["ssid"] = '"' + name + '"'; - config["key_mgmt"] = "NONE"; + config.ssid = '"' + name + '"'; + config.key_mgmt = "NONE"; WifiManager.addNetwork(config, function(ok) { if (!ok) { debug("Unable to add the network!");