summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-04-29 11:29:35 -0700
committerJames Cook <james@lindenlab.com>2010-04-29 11:29:35 -0700
commit3ba08e7149e215f4e169ff844e14bf22040735bf (patch)
tree95ab2a78345f0c36703fd4c55a2a678276c0b904 /indra/newview
parent1d8efc3701e0a22821f1bc9f7a98dff994297a7b (diff)
DEV-49489 Viewer supports People API set 409 Conflict error
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerdisplayname.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp
index 4d243ce5ae..beb1dc9c82 100644
--- a/indra/newview/llviewerdisplayname.cpp
+++ b/indra/newview/llviewerdisplayname.cpp
@@ -121,6 +121,21 @@ public:
llinfos << "status " << status << " reason " << reason << llendl;
+ // If viewer's concept of display name is out-of-date, the set request
+ // will fail with 409 Conflict. If that happens, fetch up-to-date
+ // name information.
+ if (status == 409)
+ {
+ LLUUID agent_id = gAgent.getID();
+ // Flush stale data
+ LLAvatarNameCache::erase( agent_id );
+ // Queue request for new data
+ LLAvatarName ignored;
+ LLAvatarNameCache::get( agent_id, &ignored );
+ // Kill name tag, as it is wrong
+ LLVOAvatar::invalidateNameTag( agent_id );
+ }
+
// inform caller of result
LLViewerDisplayName::sSetDisplayNameSignal(success, reason, content);
LLViewerDisplayName::sSetDisplayNameSignal.disconnect_all_slots();