Bug 786283 - Report to the caller when a scan request fails. r=vchang

This commit is contained in:
Blake Kaplan 2012-08-28 12:55:41 -03:00
Родитель 9a257bb9d0
Коммит 2ef72a3ea8
1 изменённых файлов: 10 добавлений и 1 удалений

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

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