Fixed to avoid calling NetConnection::Close() in destructor(priv. issue)
authorJaehwan Lee <jh8379.lee@samsung.com>
Thu, 4 Apr 2013 08:34:00 +0000 (17:34 +0900)
committerJaehwan Lee <jh8379.lee@samsung.com>
Thu, 4 Apr 2013 08:34:00 +0000 (17:34 +0900)
Change-Id: I909b2687b8c83e3e29deda04ae4c52a02cda2b14
Signed-off-by: Jaehwan Lee <jh8379.lee@samsung.com>
src/wifi/FNetWifi_WifiDirectGroupClientImpl.cpp
src/wifi/FNetWifi_WifiDirectGroupOwnerImpl.cpp

index 7cde9a0..4fec66a 100644 (file)
@@ -743,22 +743,17 @@ _WifiDirectGroupClientImpl::GetStringOfCurrentState(void) const
 
 _WifiDirectGroupClientImpl::~_WifiDirectGroupClientImpl(void)
 {
-       result r = E_SUCCESS;
-
        CleanUpServerSocket();
 
-       delete __pLocalIpAddress;
-
        if (__pNetConnection != null)
        {
-               r = __pNetConnection->RemoveNetConnectionListener(*this);
+               result r = __pNetConnection->RemoveNetConnectionListener(*this);
                SysTryLog(NID_NET_WIFI, r == E_SUCCESS, "[%s] Removing a NetConnectionListener has failed.", GetErrorMessage(r));
 
-               r = __pNetConnection->Close();
-               SysTryLog(NID_NET_WIFI, r == E_SUCCESS, "[%s] Closing NetConncetion has failed.", GetErrorMessage(r));
-
                delete __pNetConnection;
        }
+
+       delete __pLocalIpAddress;
 }
 
 result
index cd36784..ed7a1c8 100644 (file)
@@ -456,28 +456,14 @@ _WifiDirectGroupOwnerImpl::Release(void)
 
 _WifiDirectGroupOwnerImpl::~_WifiDirectGroupOwnerImpl(void)
 {
-       result r = E_SUCCESS;
-
        CleanUpServerSocket();
 
        if (__pNetConnection != null)
        {
-               r = __pNetConnection->RemoveNetConnectionListener(*this);
-
-               if (IsFailed(r))
-               {
-                       SysLog(NID_NET_WIFI, "Removing NetConnectionListener has failed. [result:%s]", GetErrorMessage(r));
-               }
-
-               r = __pNetConnection->Close();
-
-               if (IsFailed(r))
-               {
-                       SysLog(NID_NET_WIFI, "Closing NetConncetion has failed. [result:%s]", GetErrorMessage(r));
-               }
+               result r = __pNetConnection->RemoveNetConnectionListener(*this);
+               SysTryLog(NID_NET_WIFI, r == E_SUCCESS, "[%s] Removing a NetConnectionListener has failed.", GetErrorMessage(r));
 
                delete __pNetConnection;
-               __pNetConnection = null;
        }
        delete __pLocalIpAddress;
 }