DEV-49489 Viewer supports People API set 409 Conflict error

master
James Cook 2010-04-29 11:29:35 -07:00
parent 1d8efc3701
commit 3ba08e7149
1 changed files with 15 additions and 0 deletions

View File

@ -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();