Merge m-c to inbound. Again. For great justice.

This commit is contained in:
Ryan VanderMeulen 2012-08-28 16:54:18 -04:00
commit b02595b1f5

View File

@ -2025,23 +2025,10 @@ WifiWorker.prototype = {
return;
}
let callback = (function (networks) {
this.waitForScan((function (networks) {
this._sendMessage(message, networks !== null, networks, msg);
}).bind(this);
this.waitForScan(callback);
WifiManager.scan(true, (function(ok) {
// If the scan command succeeded, we're done.
if (ok)
return;
// Avoid sending multiple responses.
this.wantScanResults.splice(this.wantScanResults.indexOf(callback), 1);
// Otherwise, let the client know that it failed, it's responsible for
// trying again in a few seconds.
this._sendMessage(message, false, "ScanFailed", msg);
}).bind(this));
WifiManager.scan(true, function() {});
},
_notifyAfterStateChange: function(success, newState) {