author | Henry Chang <hchang@mozilla.com> |
Mon, 27 Oct 2014 10:09:51 +0800 | |
changeset 212740 | 3ea653e3c95f7a12d685ef2b4c60afc58b8d0f5d |
parent 212739 | fb989564c63465053290a76522ba2cb7da318bc8 |
child 212741 | 51a6ac1102e3beb3696810115690f13f0f8f3582 |
push id | 51042 |
push user | ryanvm@gmail.com |
push date | Tue, 28 Oct 2014 20:25:03 +0000 |
treeherder | mozilla-inbound@53d84829b2b8 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | vchang |
bugs | 1087153 |
milestone | 36.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/wifi/WifiP2pManager.jsm +++ b/dom/wifi/WifiP2pManager.jsm @@ -1325,26 +1325,35 @@ function P2pStateMachine(aP2pCommand, aN var stateDisabling = _sm.makeState("DISABLING", { enter: function() { _sm.pause(); aNetUtil.stopDhcpServer(function (success) { // Stopping DHCP server is harmless. debug('Stop DHCP server result: ' + success); aP2pCommand.p2pDisable(function(success) { debug('P2P function disabled'); - aP2pCommand.closeSupplicantConnection(function (status) { + closeSupplicantConnectionIfNeeded(function() { debug('Supplicant connection closed'); gNetworkService.disableInterface(P2P_INTERFACE_NAME, function (success){ debug('Disabled interface: ' + P2P_INTERFACE_NAME); _onDisabled(true); _sm.gotoState(stateDisabled); }); }); }); }); + + function closeSupplicantConnectionIfNeeded(callback) { + // No need to connect to supplicant on KK. Call back directly. + if (aP2pCommand.getSdkVersion() >= 19) { + callback(); + return; + } + aP2pCommand.closeSupplicantConnection(callback); + } }, handleEvent: function(aEvent) { return false; // We will not receive any event in this state. } }); //----------------------------------------------------------