summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationhandlerutil.cpp
diff options
context:
space:
mode:
authormaksymsproductengine <maksymsproductengine@lindenlab.com>2013-09-10 20:17:43 +0300
committermaksymsproductengine <maksymsproductengine@lindenlab.com>2013-09-10 20:17:43 +0300
commit8a0b7eaaddf9170db5f205d94f680915da13239c (patch)
tree7b2028fa1bbb4fa64adcc4a1298952465cd87539 /indra/newview/llnotificationhandlerutil.cpp
parentd995782edf1a55c327ad3f3349bd9d4b6ec3d9e6 (diff)
parente2019e8a3b5175eb6d7322fbe7c466f213854640 (diff)
Merge for MAINT-3117
Diffstat (limited to 'indra/newview/llnotificationhandlerutil.cpp')
-rwxr-xr-xindra/newview/llnotificationhandlerutil.cpp35
1 files changed, 20 insertions, 15 deletions
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index eb4601a469..ef4d735616 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.
+ // llwarns << " from_id for notification " << notification->getName() << " is null " << llendl;
+ 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(