mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 923443 - Pre-populate WiFi networks to allow associating with a network without connecting to it. r=vchang
This commit is contained in:
parent
6bcf42d1bf
commit
1d4dcce71e
@ -2636,12 +2636,16 @@ WifiWorker.prototype = {
|
||||
const MAX_PRIORITY = 9999;
|
||||
const message = "WifiManager:associate:Return";
|
||||
let network = msg.data;
|
||||
|
||||
let privnet = network;
|
||||
let dontConnect = privnet.dontConnect;
|
||||
delete privnet.dontConnect;
|
||||
|
||||
if (!WifiManager.enabled) {
|
||||
this._sendMessage(message, false, "Wifi is disabled", msg);
|
||||
return;
|
||||
}
|
||||
|
||||
let privnet = network;
|
||||
let self = this;
|
||||
function networkReady() {
|
||||
// saveConfig now before we disable most of the other networks.
|
||||
@ -2660,10 +2664,15 @@ WifiWorker.prototype = {
|
||||
});
|
||||
}
|
||||
|
||||
if (self._highestPriority >= MAX_PRIORITY)
|
||||
self._reprioritizeNetworks(selectAndConnect);
|
||||
else
|
||||
WifiManager.saveConfig(selectAndConnect);
|
||||
var selectAndConnectOrReturn = dontConnect ?
|
||||
function() {
|
||||
self._sendMessage(message, true, "Wifi has been recorded", msg);
|
||||
} : selectAndConnect;
|
||||
if (self._highestPriority >= MAX_PRIORITY) {
|
||||
self._reprioritizeNetworks(selectAndConnectOrReturn);
|
||||
} else {
|
||||
WifiManager.saveConfig(selectAndConnectOrReturn);
|
||||
}
|
||||
}
|
||||
|
||||
let ssid = privnet.ssid;
|
||||
|
Loading…
Reference in New Issue
Block a user