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
Родитель 34a0319694
Коммит 1007bdc936
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -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!");