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

Commit d0008f96 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Revert "P2P : Wait for the terminate events on all the open interfaces""

parents 68edafe3 ccde8a2d
Loading
Loading
Loading
Loading
+2 −20
Original line number Original line Diff line number Diff line
@@ -497,7 +497,6 @@ public class WifiMonitor {
        private final WifiMonitorSingleton mWifiMonitorSingleton;
        private final WifiMonitorSingleton mWifiMonitorSingleton;
        private int mRecvErrors = 0;
        private int mRecvErrors = 0;
        private StateMachine mStateMachine = null;
        private StateMachine mStateMachine = null;
        private int mTerminateEventCount = 0;


        public MonitorThread(WifiNative wifiNative, WifiMonitorSingleton wifiMonitorSingleton) {
        public MonitorThread(WifiNative wifiNative, WifiMonitorSingleton wifiMonitorSingleton) {
            super("WifiMonitor");
            super("WifiMonitor");
@@ -541,19 +540,8 @@ public class WifiMonitor {
                    if (m.mMonitoring) {
                    if (m.mMonitoring) {
                        mStateMachine = m.mWifiStateMachine;
                        mStateMachine = m.mWifiStateMachine;
                    } else {
                    } else {
                        String eventStrNoWS = eventStr.replaceAll("\\s+", "");
                        if (DBG) Log.d(TAG, "Dropping event because monitor (" + iface +
                        if (DBG) Log.d(TAG, "Dropping event because monitor (" + iface +
                                            ") is stopped");
                                            ") is stopped");
                            if (eventStrNoWS.endsWith("CTRL-EVENT-TERMINATING")) {
                                mTerminateEventCount ++;
                                if (mTerminateEventCount >= mWifiMonitorSingleton.mIfaceMap.size()){
                                    Log.e(TAG, "Report SUP_DISCONNECT_EVENT");
                                    WifiStateMachine wifiStateMachine = (WifiStateMachine)
                                     mWifiMonitorSingleton.getMonitor("wlan0").mWifiStateMachine;
                                    wifiStateMachine.sendMessage(SUP_DISCONNECTION_EVENT);
                                    break;
                                }
                        }
                        continue;
                        continue;
                    }
                    }
                }
                }
@@ -681,14 +669,8 @@ public class WifiMonitor {
                }
                }


                // notify and exit
                // notify and exit
                mTerminateEventCount ++;
                mStateMachine.sendMessage(SUP_DISCONNECTION_EVENT);
                if (mTerminateEventCount >= mWifiMonitorSingleton.mIfaceMap.size()) {
                    Log.e(TAG, "Report SUP_DISCONNECT_EVENT");
                    WifiStateMachine wifiStateMachine = (WifiStateMachine)
                     mWifiMonitorSingleton.getMonitor("wlan0").mWifiStateMachine;
                    wifiStateMachine.sendMessage(SUP_DISCONNECTION_EVENT);
                return true;
                return true;
                }
            } else if (event == EAP_FAILURE) {
            } else if (event == EAP_FAILURE) {
                if (eventData.startsWith(EAP_AUTH_FAILURE_STR)) {
                if (eventData.startsWith(EAP_AUTH_FAILURE_STR)) {
                    mStateMachine.sendMessage(AUTHENTICATION_FAILURE_EVENT);
                    mStateMachine.sendMessage(AUTHENTICATION_FAILURE_EVENT);