diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llerror.cpp | 29 | ||||
-rw-r--r-- | indra/llmessage/lltransfermanager.cpp | 4 |
2 files changed, 31 insertions, 2 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 29de79dc64..153bfab54c 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -899,6 +899,33 @@ namespace LLError namespace { + std::string sanitizeMessage(const std::string& message) + { + std::string message_new; + S32 len = message.length(); + for (S32 i = 0; i < len; i++) + { + char c = message[i]; + if (c == '\\') + { + message_new += "\\\\"; + } + else if (c == '\n') + { + message_new += "\\n"; + } + else if (c == '\r') + { + message_new += "\\r"; + } + else + { + message_new += c; + } + } + return message_new; + } + void writeToRecorders(const LLError::CallSite& site, const std::string& message, bool show_location = true, bool show_time = true, bool show_tags = true, bool show_level = true, bool show_function = true) { LLError::ELevel level = site.mLevel; @@ -937,7 +964,7 @@ namespace message_stream << site.mFunctionString << " "; } - message_stream << message; + message_stream << sanitizeMessage(message); r->recordMessage(level, message_stream.str()); } diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp index ec7b21d8b6..452b77fb6d 100644 --- a/indra/llmessage/lltransfermanager.cpp +++ b/indra/llmessage/lltransfermanager.cpp @@ -62,9 +62,11 @@ LLTransferManager::LLTransferManager() : LLTransferManager::~LLTransferManager() { + // LLTransferManager should have been cleaned up by message system shutdown process + llassert(!mValid); if (mValid) { - LL_WARNS() << "LLTransferManager::~LLTransferManager - Should have been cleaned up by message system shutdown process" << LL_ENDL; + // Usually happens if OS tries to kill viewer cleanup(); } } |