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

This commit is contained in:
Blake Kaplan 2012-02-16 15:42:25 +01:00
Родитель aca2c553ca
Коммит 39786a0ab2
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!");