don't log error if connection has been already terminated in HangUp() (patch 1243184)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-07-28 21:15:53 +00:00
parent c5c4070f88
commit fbd3c46d32

View File

@@ -947,8 +947,10 @@ bool wxDialUpManagerMSW::HangUp()
return false; return false;
} }
DWORD dwRet = ms_pfnRasHangUp(hRasConn); // note that it's not an error if the connection had been already
if ( dwRet != 0 ) // terminated
const DWORD dwRet = ms_pfnRasHangUp(hRasConn);
if ( dwRet != 0 && dwRet != ERROR_NO_CONNECTION )
{ {
wxLogError(_("Failed to terminate the dialup connection: %s"), wxLogError(_("Failed to terminate the dialup connection: %s"),
GetErrorString(dwRet).c_str()); GetErrorString(dwRet).c_str());