From c9740a9e612ffcb5d6ba90248d049d17e1cb3494 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 13 Feb 2016 13:57:43 +0100 Subject: [PATCH 1/4] Fixed: Return true when "open" succeeds under OS X --HG-- branch : develop --- code/nel/src/misc/common.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index 41a11976f..b40734b73 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -777,8 +777,12 @@ bool launchProgram(const std::string &programName, const std::string &arguments, int res = system(command.c_str()); - if (res && log) + if (!res) return true; + + if (log) + { nlwarning ("LAUNCH: Failed launched '%s' with arg '%s' return code %d", programName.c_str(), arguments.c_str(), res); + } #else static bool firstLaunchProgram = true; From 9913ec7e72d976b4ba320bff5681c7b6e234aa65 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 13 Feb 2016 13:58:21 +0100 Subject: [PATCH 2/4] Fixed: Don't try to convert next meshes if an error occurs --HG-- branch : develop --- code/nel/tools/3d/mesh_export/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/3d/mesh_export/main.cpp b/code/nel/tools/3d/mesh_export/main.cpp index be19c92ff..f22e53f41 100644 --- a/code/nel/tools/3d/mesh_export/main.cpp +++ b/code/nel/tools/3d/mesh_export/main.cpp @@ -43,7 +43,7 @@ int main(int argc, char *argv[]) NL3D::registerSerial3d(); sint res = 0; - + for(uint i = 0; i < filePathes.size(); ++i) { std::string filePath = filePathes[i]; @@ -78,6 +78,8 @@ int main(int argc, char *argv[]) settings.ToolErrorLog = settings.DestinationDirectoryPath + "error.log"; res = exportScene(settings); + + if (res != EXIT_SUCCESS) break; } return res; From 203e09dca1af4bc2613587a1cc95fadd23121405 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 13 Feb 2016 13:58:51 +0100 Subject: [PATCH 3/4] Fixed: Check VerboseLog config variable instead of "pPM->isVerboseLog()" --HG-- branch : develop --- code/ryzom/client/src/login.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 35a811f9b..bace38e04 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -899,7 +899,7 @@ bool login() Actions.enable(true); EditActions.enable(true); - if(ClientCfg.ConfigFile.exists("pPM->isVerboseLog()")) + if(ClientCfg.ConfigFile.exists("VerboseLog")) pPM->setVerboseLog(ClientCfg.ConfigFile.getVar("VerboseLog").asInt() == 1); if(pPM->isVerboseLog()) nlinfo("Using verbose log mode"); @@ -1864,9 +1864,7 @@ class CAHOpenURL : public IActionHandler // Process any inserts in lpMsgBuf. // ... // Display the string. - nlwarning("RegQueryValue for '%s' : %s", KeyName, lpMsgBuf); - // Free the buffer. - LocalFree( lpMsgBuf ); + nlwarning("RegQueryValue for '%s' : %s", KeyName, NLMISC::formatErrorMessage(0).c_str()); } #else // TODO: for Linux and Mac OS From c28ecf85a057301b2b48e61fbcf5900e6a9d04f4 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 13 Feb 2016 13:59:32 +0100 Subject: [PATCH 4/4] Changed: Don't call FormatMessage --HG-- branch : develop --- code/ryzom/client/src/login.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index bace38e04..de712d721 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -1848,19 +1848,6 @@ class CAHOpenURL : public IActionHandler } else { - DWORD ret = 0; - LPVOID lpMsgBuf; - FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - ret, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPTSTR) &lpMsgBuf, - 0, - NULL - ); // Process any inserts in lpMsgBuf. // ... // Display the string.