{
__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;
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");
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");