From 8f0b7ae8e77984a30732170d298c3f24ac185a76 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Sun, 16 May 2010 20:18:05 +0000 Subject: Fixed bogus error message git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@516 4f64403b-2f21-0410-a795-97e2b3489a10 --- updater/socket.cpp | 5 +++-- updater/utils.cpp | 2 +- updater/xmldata.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/updater/socket.cpp b/updater/socket.cpp index 729b997..defa292 100644 --- a/updater/socket.cpp +++ b/updater/socket.cpp @@ -148,9 +148,10 @@ bool GetFile(char *url, TCHAR *temp_folder, char *plugin_name, char *version, bo } else { - TCHAR buff[1024]; - mir_sntprintf(buff, SIZEOF(buff), TranslateT("Failed to download \"%s\" - Invalid response, code %d"), plugin_name, resp->resultCode); + TCHAR buff[1024], *tmp; + mir_sntprintf(buff, SIZEOF(buff), TranslateT("Failed to download \"%s\" - Invalid response, code %d"), (tmp = mir_a2t(plugin_name)), resp->resultCode); ShowError(buff); + mir_free(tmp); } CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)resp); } diff --git a/updater/utils.cpp b/updater/utils.cpp index d22aa53..8448217 100644 --- a/updater/utils.cpp +++ b/updater/utils.cpp @@ -207,7 +207,7 @@ void NLogF(const char *fmt, ...) #ifdef _UNICODE void NLog(wchar_t *msg) { - char* a = mir_u2a(msg); + char* a = mir_utf8encodeW(msg); CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)a); mir_free(a); } diff --git a/updater/xmldata.cpp b/updater/xmldata.cpp index 2ef8e67..3a4677a 100644 --- a/updater/xmldata.cpp +++ b/updater/xmldata.cpp @@ -278,7 +278,7 @@ bool UpdateXMLData(const Category cat, const char *redirect_url /*= 0*/, int rec //MessageBox(0, buff + len, TranslateT("Updater: Error Downloading XML Data"), MB_OK | MB_ICONWARNING); } else { ShowError(TranslateT("Failed to download XML data - Response is NULL")); - //MessageBox(0, TranslateT("Error downloading XML data...\nResponse is NULL"), Translate("Updater Error"), MB_OK | MB_ICONWARNING); + //MessageBox(0, TranslateT("Error downloading XML data...\nResponse is NULL"), TranslateT("Updater Error"), MB_OK | MB_ICONWARNING); NLog("Failed to download XML data - Response is NULL"); } return LoadOldXMLData(cat, false); -- cgit v1.2.3