diff options
author | Irfan Sheriff <isheriff@google.com> | 2012-10-03 15:53:45 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2012-10-03 15:53:45 -0700 |
commit | 0befeb29bcdf05b913a332edb4f222e11b4817ac (patch) | |
tree | 3cc742917af8af436e5adff1d9ee6c3f1052a3e5 /wifi | |
parent | ebb8f413e63dee6d96904a49a3508b97671e5fe8 (diff) | |
download | frameworks_base-0befeb29bcdf05b913a332edb4f222e11b4817ac.zip frameworks_base-0befeb29bcdf05b913a332edb4f222e11b4817ac.tar.gz frameworks_base-0befeb29bcdf05b913a332edb4f222e11b4817ac.tar.bz2 |
Clear interface address and reset connections
With the broadcom architecture, the p2p interface on a group
was dynamic that would just go away. Clearing addresses
was thus not important before.
It is good to clear up the addresses and reset connections
when the group is removed.
Bug: 7282358
Change-Id: Ia1a94fce90f86b54abcc2d1f78a33524ef8045fa
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/p2p/WifiP2pService.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java index ef57e63..ca329e6 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java @@ -1662,7 +1662,6 @@ public class WifiP2pService extends IWifiP2pManager.Stub { private void stopDhcpServer(String intf) { try { mNwService.stopTethering(); - mNwService.clearInterfaceAddresses(intf); } catch (Exception e) { loge("Error stopping Dhcp server" + e); return; @@ -2166,6 +2165,13 @@ public class WifiP2pService extends IWifiP2pManager.Stub { mDhcpStateMachine = null; } + try { + mNwService.clearInterfaceAddresses(mGroup.getInterface()); + } catch (Exception e) { + loge("Failed to clear addresses " + e); + } + NetworkUtils.resetConnections(mGroup.getInterface(), NetworkUtils.RESET_ALL_ADDRESSES); + mGroup = null; mWifiNative.p2pFlush(); mServiceDiscReqId = null; |