]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dialup.cpp
WinCE fixes (in case a WinCE-friendly backend gets written one day)
[wxWidgets.git] / src / msw / dialup.cpp
index b4bb8d55eabf03a048161ff7cee07248935db0cc..0114b7759e8e41da798a1c1a00a7b119c5424667 100644 (file)
@@ -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());