From ad4857cfaaa95ff3d0b059f948dc7d7d6609eb57 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 23 Feb 2016 16:57:34 +0100 Subject: [PATCH 1/4] Changed: Minor changes --HG-- branch : develop --- code/nel/src/misc/system_utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/src/misc/system_utils.cpp b/code/nel/src/misc/system_utils.cpp index 4b59817e0..de23db001 100644 --- a/code/nel/src/misc/system_utils.cpp +++ b/code/nel/src/misc/system_utils.cpp @@ -231,11 +231,11 @@ bool CSystemUtils::supportUnicode() { init = true; #ifdef NL_OS_WINDOWS - OSVERSIONINFO osvi; + OSVERSIONINFOA osvi; osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); // get Windows version - if (GetVersionEx(&osvi)) + if (GetVersionExA(&osvi)) { if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) { @@ -347,7 +347,7 @@ bool CSystemUtils::setRegKey(const string &ValueName, const string &Value) HKEY hkey; DWORD dwDisp; - if (RegCreateKeyExW(HKEY_CURRENT_USER, utf8ToWide(RootKey), 0, L"", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, &dwDisp) == ERROR_SUCCESS) + if (RegCreateKeyExW(HKEY_CURRENT_USER, utf8ToWide(RootKey), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, &dwDisp) == ERROR_SUCCESS) { ucstring utf16Value = ucstring::makeFromUtf8(Value); From 89d1c5140828923abfdeb83610078aa336d5000e Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 23 Feb 2016 16:58:07 +0100 Subject: [PATCH 2/4] Fixed: Use full path for client_default.cfg --HG-- branch : develop --- code/ryzom/client/src/client_cfg.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 32b345294..e59dd6886 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -2222,9 +2222,11 @@ bool CClientConfig::getDefaultConfigLocation(std::string& p_name) const defaultConfigPath = Args.getProgramPath(); #endif + std::string currentPath = CPath::standardizePath(CPath::getCurrentPath()); + // look in the current working directory first - if (CFile::isExists(defaultConfigFileName)) - p_name = defaultConfigFileName; + if (CFile::isExists(currentPath + defaultConfigFileName)) + p_name = currentPath + defaultConfigFileName; // look in startup directory else if (CFile::isExists(Args.getStartupPath() + defaultConfigFileName)) From e7645739a63c9c71d499fd66d3c7685210594268 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 23 Feb 2016 16:58:57 +0100 Subject: [PATCH 3/4] Fixed: Don't append empty login, password or shard ID to batch --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 35dc39496..0d0209427 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -1029,12 +1029,20 @@ void CPatchManager::executeBatchFile() arguments += "\"" + RyzomFilename + "\" \"" + ClientPatchPath + "\" " + ClientRootPath + "\""; #endif - // append login and password - arguments += " " + LoginLogin + " " + LoginPassword; - - if (!r2Mode) + // append login, password and shard + if (!LoginLogin.empty()) { - arguments += " " + toString(LoginShardId); + arguments += " " + LoginLogin; + + if (!LoginPassword.empty()) + { + arguments += " " + LoginPassword; + + if (!r2Mode) + { + arguments += " " + toString(LoginShardId); + } + } } if (!launchProgram(batchFilename, arguments, false)) From 79be594f54594bcaed0af37ba26db77c7e32dc95 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 23 Feb 2016 17:05:04 +0100 Subject: [PATCH 4/4] Changed: Trim URL before to display it --HG-- branch : develop --- code/ryzom/common/src/game_share/http_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/common/src/game_share/http_client.cpp b/code/ryzom/common/src/game_share/http_client.cpp index 9abc5929c..d9add4692 100644 --- a/code/ryzom/common/src/game_share/http_client.cpp +++ b/code/ryzom/common/src/game_share/http_client.cpp @@ -79,7 +79,7 @@ bool CHttpClient::send(const std::string& buffer, bool verbose) if(verbose) { - nldebug("Sending '%s' to '%s'", buffer.c_str(), _Sock.remoteAddr().asString().c_str()); + nldebug("Sending '%s' to '%s'", trim(buffer).c_str(), _Sock.remoteAddr().asString().c_str()); } uint32 size = (uint32)buffer.size();