Fixed some issue
authorJaehwan Lee <jh8379.lee@samsung.com>
Thu, 11 Apr 2013 09:59:19 +0000 (18:59 +0900)
committerJaehwan Lee <jh8379.lee@samsung.com>
Thu, 11 Apr 2013 09:59:19 +0000 (18:59 +0900)
1.Ignore Disconected event when wifi state is conencted.
2.Modify converting log for security type

Change-Id: Ifbf34e48dfd5b5727598de7aedc4bd334b147a6e
Signed-off-by: Jaehwan Lee <jh8379.lee@samsung.com>
src/wifi/FNetWifi_WifiManagerImpl.cpp
src/wifi/FNetWifi_WifiSystemAdapter.cpp
src/wifi/FNetWifi_WifiUtility.cpp

index 014e003..8881da3 100644 (file)
@@ -692,11 +692,14 @@ _WifiManagerImpl::OnWifiDisconnected(void)
         break;
 
     case WIFI_MANAGER_CONNECTING:
-               __currentState = WIFI_MANAGER_ACTIVATED;
                if (__wasConnected == true)
                {
                        isFired = true;
                }
+               else
+               {
+                       __currentState = WIFI_MANAGER_ACTIVATED;
+               }
         break;
 
     case WIFI_MANAGER_CONNECTED:
index aa5d662..c824165 100644 (file)
@@ -423,6 +423,13 @@ _WifiSystemAdapter::OnWifiConnectionStateChanged(wifi_connection_state_e state,
 
     case WIFI_CONNECTION_STATE_DISCONNECTED:
     {
+       wifi_connection_state_e connectionState = WIFI_CONNECTION_STATE_DISCONNECTED;
+        wifi_get_connection_state(&connectionState);
+
+        // Ignore if wifi state is connected.
+        if (connectionState == WIFI_CONNECTION_STATE_CONNECTED)
+               break;
+
        while (pEnum->MoveNext() == E_SUCCESS)
        {
            pEnum->GetCurrent(pMgrEvtListener);
index b1a4a3e..ca3f811 100644 (file)
@@ -78,28 +78,19 @@ _WifiUtility::ConvertAuthType(wifi_security_type_e securityMode, wifi_encryption
         break;
 
     case WIFI_SECURITY_TYPE_WPA_PSK:
-        if (encryptionMode == WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED)
-        {
-            authenticationType = WIFI_AUTHENTICATION_WPA_WPA2_MIXED_PSK;
-        }
-        else
+        if (encryptionMode == WIFI_ENCRYPTION_TYPE_TKIP)
         {
             authenticationType = WIFI_AUTHENTICATION_WPA_PSK;
         }
-        break;
-
-    case WIFI_SECURITY_TYPE_WPA2_PSK:
-
-        if (encryptionMode == WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED)
-        {
-            authenticationType = WIFI_AUTHENTICATION_WPA_WPA2_MIXED_PSK;
-        }
+        else if (encryptionMode == WIFI_ENCRYPTION_TYPE_AES)
+       {
+               authenticationType = WIFI_AUTHENTICATION_WPA2_PSK;
+       }
         else
-        {
-            authenticationType = WIFI_AUTHENTICATION_WPA2_PSK;
-        }
+       {
+               authenticationType = WIFI_AUTHENTICATION_WPA_WPA2_MIXED_PSK;
+       }
         break;
-
     default:
         break;
     }