diff options
Diffstat (limited to 'indra/newview/llnotificationhandlerutil.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llnotificationhandlerutil.cpp | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index eb4601a469..a078889d46 100644..100755 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -125,24 +125,29 @@ void log_name_callback(const std::string& full_name, const std::string& from_nam // static void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_file_only) { - LLUUID from_id = notification->getPayload()["from_id"]; + if (!gCacheName) + { + return; + } - if (from_id.isNull()) - { - // Normal behavior for system generated messages, don't spam. - // llwarns << " from_id for notification " << notification->getName() << " is null " << llendl; - return; - } + LLUUID from_id = notification->getPayload()["from_id"]; - if(to_file_only) - { - gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID())); - } - else - { - gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id)); - } + if (from_id.isNull()) + { + // Normal behavior for system generated messages, don't spam. + // LL_WARNS() << " from_id for notification " << notification->getName() << " is null " << LL_ENDL; + return; + } + + if(to_file_only) + { + gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID())); } + else + { + gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id)); + } +} // static void LLHandlerUtil::logGroupNoticeToIMGroup( @@ -153,9 +158,9 @@ void LLHandlerUtil::logGroupNoticeToIMGroup( LLGroupData groupData; if (!gAgent.getGroupData(payload["group_id"].asUUID(), groupData)) { - llwarns + LL_WARNS() << "Group notice for unknown group: " - << payload["group_id"].asUUID() << llendl; + << payload["group_id"].asUUID() << LL_ENDL; return; } |