diff options
author | James Cook <james@lindenlab.com> | 2010-03-03 16:41:17 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-03-03 16:41:17 -0800 |
commit | d0632598632465850568789ce2d00dcc325e5ebe (patch) | |
tree | 9bd2dfbf6144972a82e9f4e52e7d20345b8469d6 /indra | |
parent | 207c40de9435d2a51c41bc0b72250cd5ff7e87ac (diff) |
Work around bad usernames occasionally sent from server.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llmessage/llcachename.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 8575332392..d7d49eac8d 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -891,8 +891,21 @@ void LLCacheName::Impl::processUUIDReply(LLMessageSystem* msg, bool isGroup) if (!isGroup) { - std::string full_name = - LLCacheName::buildFullName(entry->mFirstName, entry->mLastName); + // NOTE: Very occasionally the server sends down a full name + // in the first name field with an empty last name, for example, + // first = "Ladanie1 Resident", last = "". + // I cannot reproduce this, nor can I find a bug in the server code. + // Ensure "Resident" does not appear via cleanFullName, because + // buildFullName only checks last name. JC + std::string full_name; + if (entry->mLastName.empty()) + { + full_name = cleanFullName(entry->mFirstName); + } + else + { + full_name = LLCacheName::buildFullName(entry->mFirstName, entry->mLastName); + } mSignal(id, full_name, false); mReverseCache[full_name] = id; } |