diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2010-07-13 19:42:31 +0300 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2010-07-13 19:42:31 +0300 |
commit | c73dcb0a2d328d786c4eceb417d959ae68c2e3a8 (patch) | |
tree | f3f4d894f8140751b5c4bcf907a8f036046dacf1 /indra | |
parent | f790036002a49176066ec346e4068dc05aa88357 (diff) |
EXT-8341 FIXED Avoided assertion on receiving object auto return notification.
Details:
1 Provided passing necessary is_group parameter to LLPostponedNotification::add<LLPostponedServerObjectNotification> method call;
3 Corrected handling group name in LLPostponedNotification::onCachedNameReceived;
2 Added check on retrieved name from cache name and replacement with fallback value.
reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/743/
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llnotifications.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 621e72ce38..9e272a0949 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -34,6 +34,7 @@ #include "llnotifications.h" +#include "llinstantmessage.h" #include "llxmlnode.h" #include "lluictrl.h" #include "lluictrlfactory.h" @@ -41,6 +42,7 @@ #include "llsdserialize.h" #include "lltrans.h" #include "llnotificationslistener.h" +#include "llstring.h" #include <algorithm> #include <boost/regex.hpp> @@ -1487,7 +1489,14 @@ std::ostream& operator<<(std::ostream& s, const LLNotification& notification) void LLPostponedNotification::onCachedNameReceived(const LLUUID& id, const std::string& first, const std::string& last, bool is_group) { - gCacheName->getFullName(id, mName); + mName = first + " " + last; + + LLStringUtil::trim(mName); + if (mName.empty()) + { + llwarns << "Empty name received for Id: " << id << llendl; + mName = SYSTEM_FROM; + } modifyNotificationParams(); LLNotifications::instance().add(mParams); cleanup(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 07b6431c92..53fb01aec3 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2585,7 +2585,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) params.substitutions = substitutions; params.payload = payload; - LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, false); + LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, from_group); } break; case IM_FROM_TASK_AS_ALERT: |