Bug 728029 - Try to force a connection to Mozilla Guest, even if it's not broadcasting. r=cjones

--HG--
extra : rebase_source : 15bd53e8bec6d63920b1a990956c744750cca914
This commit is contained in:
Blake Kaplan 2012-02-16 15:42:25 +01:00
parent 1383896cd3
commit b90d0e2daa

View File

@ -837,18 +837,19 @@ function nsWifiWorker() {
debug("Network Mozilla exists, but is encrypted"); debug("Network Mozilla exists, but is encrypted");
net = null; net = null;
} }
var config = Object.create(null);
if (!net) { if (!net) {
name = "Mozilla Guest"; name = "Mozilla Guest";
net = self.networks[name]; net = self.networks[name];
if (!net || (net.flags && net.flags !== "[IBSS]")) { if (!net || (net.flags && net.flags !== "[IBSS]")) {
debug("Network Mozilla Guest doesn't exist or is encrypted"); debug("Can't find either network, trying to force 'Mozilla Guest'");
return; config.scan_ssid = 1;
} }
} }
var config = Object.create(null); config.ssid = '"' + name + '"';
config["ssid"] = '"' + name + '"'; config.key_mgmt = "NONE";
config["key_mgmt"] = "NONE";
WifiManager.addNetwork(config, function(ok) { WifiManager.addNetwork(config, function(ok) {
if (!ok) { if (!ok) {
debug("Unable to add the network!"); debug("Unable to add the network!");