From: Jaehwan Lee Date: Thu, 4 Apr 2013 08:34:00 +0000 (+0900) Subject: Fixed to avoid calling NetConnection::Close() in destructor(priv. issue) X-Git-Tag: accepted/tizen_2.1/20130425.034729~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8bbfda06e719181f156aafbd67a18d999aa8e276;p=framework%2Fosp%2Fnet.git Fixed to avoid calling NetConnection::Close() in destructor(priv. issue) Change-Id: I909b2687b8c83e3e29deda04ae4c52a02cda2b14 Signed-off-by: Jaehwan Lee --- diff --git a/src/wifi/FNetWifi_WifiDirectGroupClientImpl.cpp b/src/wifi/FNetWifi_WifiDirectGroupClientImpl.cpp index 7cde9a0..4fec66a 100644 --- a/src/wifi/FNetWifi_WifiDirectGroupClientImpl.cpp +++ b/src/wifi/FNetWifi_WifiDirectGroupClientImpl.cpp @@ -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 diff --git a/src/wifi/FNetWifi_WifiDirectGroupOwnerImpl.cpp b/src/wifi/FNetWifi_WifiDirectGroupOwnerImpl.cpp index cd36784..ed7a1c8 100644 --- a/src/wifi/FNetWifi_WifiDirectGroupOwnerImpl.cpp +++ b/src/wifi/FNetWifi_WifiDirectGroupOwnerImpl.cpp @@ -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; }