Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ffc2035 authored by Mahesh A Saptasagar's avatar Mahesh A Saptasagar Committed by Gerrit - the friendly Code Review server
Browse files

p2p:Fix for discovery failure until STA is connected to AP.

The station when connecting to AP (wifi state is either
connecting or obtaining ip address) shall stop the already
issued p2p_find on the DHCP start and start the same after
the DHCP handshake. p2p service manager shall return a failure
for any p2p_find operation during these period resulting in a
discover failure.
Address this by deferring the p2p_find issued during this period
(set mDiscoveryPostponed to true) rather than returning a failure.

Change-Id: I40b2017bf126fd0d543ada8853223402cda63e9d
CRs-Fixed: 532138
parent e79e09fe
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -930,8 +930,10 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
                    break;
                case WifiP2pManager.DISCOVER_PEERS:
                    if (mDiscoveryBlocked) {
                        replyToMessage(message, WifiP2pManager.DISCOVER_PEERS_FAILED,
                                WifiP2pManager.BUSY);
                        /* do not send discovery failure to apps.
                         since discovery is postponed and not failed */
                        mDiscoveryPostponed = true;
                        logi("P2P_FIND is deffered");
                        break;
                    }
                    // do not send service discovery request while normal find operation.