summaryrefslogtreecommitdiff
path: root/indra/llmessage/llavatarnamecache.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-06-04 22:43:55 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-06-05 16:59:34 +0300
commit6fddbeb3973c3cd2135ba101afc13329a8c9fe49 (patch)
tree31ce03a1183fb0035c2391671433aaa3d4a70b05 /indra/llmessage/llavatarnamecache.cpp
parent0b61150e698537a7e42a4cdae02496da500399d9 (diff)
SL-12748 Blocked username displays old name after name change
Diffstat (limited to 'indra/llmessage/llavatarnamecache.cpp')
-rw-r--r--indra/llmessage/llavatarnamecache.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index 6a287f0cc5..6ada12962c 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -285,12 +285,27 @@ void LLAvatarNameCache::processName(const LLUUID& agent_id, const LLAvatarName&
return;
}
+ bool updated_account = true; // assume obsolete value for new arrivals by default
+
+ std::map<LLUUID, LLAvatarName>::iterator it = mCache.find(agent_id);
+ if (it != mCache.end()
+ && (*it).second.getAccountName() == av_name.getAccountName())
+ {
+ updated_account = false;
+ }
+
// Add to the cache
mCache[agent_id] = av_name;
// Suppress request from the queue
mPendingQueue.erase(agent_id);
+ // notify mute list about changes
+ if (updated_account && mAccountNameChangedCallback)
+ {
+ mAccountNameChangedCallback(agent_id, av_name);
+ }
+
// Signal everyone waiting on this name
signal_map_t::iterator sig_it = mSignalMap.find(agent_id);
if (sig_it != mSignalMap.end())
@@ -303,6 +318,8 @@ void LLAvatarNameCache::processName(const LLUUID& agent_id, const LLAvatarName&
delete signal;
signal = NULL;
}
+
+
}
void LLAvatarNameCache::requestNamesViaCapability()