X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/02761f6cd478e3c2c97cf6f93442747f7b029833..722f74cec895bbc284ba7b7a7213ee5cf2a1ab95:/src/msw/dialup.cpp diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 76ad747b72..566c31c335 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -163,7 +163,7 @@ struct WXDLLEXPORT wxRasThreadData HANDLE hEventRas, // automatic event which RAS signals when status changes hEventQuit; // manual event which we signal when we terminate - class WXDLLEXPORT wxDialUpManagerMSW *dialUpManager; // the owner + class WXDLLIMPEXP_FWD_CORE wxDialUpManagerMSW *dialUpManager; // the owner }; // ---------------------------------------------------------------------------- @@ -452,12 +452,10 @@ wxDialUpManagerMSW::wxDialUpManagerMSW() exit: if ( funcName ) { - static const wxChar *msg = wxTRANSLATE( -"The version of remote access service (RAS) installed on this machine is too\ -old, please upgrade (the following required function is missing: %s)." - ); - - wxLogError(wxGetTranslation(msg), funcName); + wxLogError(_("The version of remote access service (RAS) installed " + "on this machine is too old, please upgrade (the " + "following required function is missing: %s)."), + funcName); m_dllRas.Unload(); return; } @@ -711,7 +709,13 @@ size_t wxDialUpManagerMSW::GetISPNames(wxArrayString& names) const if ( dwRet == ERROR_BUFFER_TOO_SMALL ) { // reallocate the buffer - rasEntries = (RASENTRYNAME *)realloc(rasEntries, size); + void *n = realloc(rasEntries, size); + if (n == NULL) + { + free(rasEntries); + return 0; + } + rasEntries = (RASENTRYNAME *)n; } else if ( dwRet != 0 ) { @@ -878,9 +882,12 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, if ( dwRet != 0 ) { // can't pass a wxWCharBuffer through ( ... ) - wxLogError(_("Failed to %s dialup connection: %s"), - wxString(async ? _("initiate") : _("establish")).c_str(), - GetErrorString(dwRet).c_str()); + if ( async ) + wxLogError(_("Failed to initiate dialup connection: %s"), + GetErrorString(dwRet).c_str()); + else + wxLogError(_("Failed to establish dialup connection: %s"), + GetErrorString(dwRet).c_str()); // we should still call RasHangUp() if we got a non 0 connection if ( ms_hRasConnection )