X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8563c6f18aa1a98a07334f6e413756542ef31412..b910a8add446261996bc8d22e6545e6bdb373b8b:/src/msw/dialup.cpp?ds=sidebyside diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index b4bb8d55ea..074b23c6a5 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -947,8 +947,10 @@ bool wxDialUpManagerMSW::HangUp() return false; } - DWORD dwRet = ms_pfnRasHangUp(hRasConn); - if ( dwRet != 0 ) + // note that it's not an error if the connection had been already + // terminated + const DWORD dwRet = ms_pfnRasHangUp(hRasConn); + if ( dwRet != 0 && dwRet != ERROR_NO_CONNECTION ) { wxLogError(_("Failed to terminate the dialup connection: %s"), GetErrorString(dwRet).c_str()); @@ -1186,7 +1188,7 @@ void wxDialUpManagerMSW::DisableAutoCheckOnlineStatus() { wxCHECK_RET( IsOk(), wxT("using uninitialized wxDialUpManager") ); - if ( --m_autoCheckLevel ) + if ( --m_autoCheckLevel != 0 ) { // still checking return;