From 8bbfda06e719181f156aafbd67a18d999aa8e276 Mon Sep 17 00:00:00 2001 From: Jaehwan Lee Date: Thu, 4 Apr 2013 17:34:00 +0900 Subject: [PATCH] Fixed to avoid calling NetConnection::Close() in destructor(priv. issue) Change-Id: I909b2687b8c83e3e29deda04ae4c52a02cda2b14 Signed-off-by: Jaehwan Lee --- src/wifi/FNetWifi_WifiDirectGroupClientImpl.cpp | 11 +++-------- src/wifi/FNetWifi_WifiDirectGroupOwnerImpl.cpp | 18 ++---------------- 2 files changed, 5 insertions(+), 24 deletions(-) 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; } -- 2.7.4