mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 972628 - Remove redundant network while loading network config. r=vchang
This commit is contained in:
parent
424b8dd322
commit
86e4ddf16b
@ -2304,8 +2304,10 @@ WifiWorker.prototype = {
|
||||
// Convert between netId-based and ssid-based indexing.
|
||||
for (let net in networks) {
|
||||
let network = networks[net];
|
||||
delete networks[net];
|
||||
|
||||
if (!network.ssid) {
|
||||
delete networks[net]; // TODO support these?
|
||||
WifiManager.removeNetwork(network.netId, function() {});
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -2313,8 +2315,11 @@ WifiWorker.prototype = {
|
||||
this._highestPriority = network.priority;
|
||||
|
||||
let networkKey = getNetworkKey(network);
|
||||
// Accept latest config of same network(same SSID and same security).
|
||||
if (networks[networkKey]) {
|
||||
WifiManager.removeNetwork(networks[networkKey].netId, function() {});
|
||||
}
|
||||
networks[networkKey] = network;
|
||||
delete networks[net];
|
||||
}
|
||||
|
||||
this.configuredNetworks = networks;
|
||||
|
Loading…
Reference in New Issue
Block a user