Fixed JIra issue(N_SE-36469, N_SE-36410 ) 2.1b_release accepted/tizen_2.1/20130426.150459 submit/tizen_2.1/20130426.150033
authorJaehwan Lee <jh8379.lee@samsung.com>
Fri, 26 Apr 2013 10:57:02 +0000 (19:57 +0900)
committerJaehwan Lee <jh8379.lee@samsung.com>
Fri, 26 Apr 2013 10:57:02 +0000 (19:57 +0900)
Change-Id: I4d99cfacf7ae2b413a5d062ce12a98c959108a09
Signed-off-by: Jaehwan Lee <jh8379.lee@samsung.com>
src/wifi/FNetWifi_WifiDirectSystemAdapter.cpp

index ef8098c..7e121fb 100644 (file)
@@ -1680,7 +1680,13 @@ _WifiDirectSystemAdapter::OnWifiDirectScanCompleted(int errorCode, wifi_direct_d
                        {
                                __pWifiDirectSystemAdapter->__currentScanState = WIFI_DIRECT_SYSTEM_SCAN_IDLE;
                                r = __pWifiDirectSystemAdapter->StartDiscovery();
-                               SysTryLog(NID_NET_WIFI, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
+
+                               if (r != E_SUCCESS)
+                               {
+                                       SysLog(NID_NET_WIFI, "[%s] Propagating.", GetErrorMessage(r));
+                                       __pWifiDirectSystemAdapter->__currentScanState = WIFI_DIRECT_SYSTEM_SCAN_IDLE;
+                                       pEventArg = new (std::nothrow) _WifiDirectEventArg(WIFI_DIRECT_DEVICE_EVENT_SCAN_COMPLETED, DEFAULT_DEVICE_ID, E_SYSTEM);
+                               }
                        }
                        break;
 
@@ -1778,6 +1784,12 @@ _WifiDirectSystemAdapter::OnWifiDirectEachDiscoveredPeer(wifi_direct_discovered_
 bool
 _WifiDirectSystemAdapter::OnWifiDirectEachConnectedClient(wifi_direct_connected_peer_info_s* pPeer, void* pUserData)
 {
+       if (pPeer == null)
+       {
+               SysLog(NID_NET_WIFI, "Connected peer information is not exist.");
+               return false;
+       }
+
        IList* pList = static_cast< IList* >(pUserData);
        SysTryReturn(NID_NET_WIFI, pList != null, false, E_SYSTEM, "[E_SYSTEM] Failed to acquire list of peers");
 
@@ -1792,6 +1804,11 @@ _WifiDirectSystemAdapter::OnWifiDirectEachConnectedClient(wifi_direct_connected_
 bool
 _WifiDirectSystemAdapter::OnWifiDirectConnectedOwner(wifi_direct_connected_peer_info_s* pPeer, void* pUserData)
 {
+       if (pPeer == null)
+       {
+               SysLog(NID_NET_WIFI, "Connected peer information is not exist.");
+               return false;
+       }
        IList* pList = static_cast< IList* >(pUserData);
        SysTryReturn(NID_NET_WIFI, pList != null, false, E_SYSTEM, "[E_SYSTEM] Failed to acquire list of peers");