Avoid AvNameCache log spam for NULL UUID
parent
e0be68917b
commit
49039e66ea
|
|
@ -632,6 +632,13 @@ bool LLAvatarNameCache::get(const LLUUID& agent_id, LLAvatarName *av_name)
|
|||
// returns bool specifying if av_name was filled, false otherwise
|
||||
bool LLAvatarNameCache::getName(const LLUUID& agent_id, LLAvatarName *av_name)
|
||||
{
|
||||
// <FS:Beq> Avoid null entries entering NameCache
|
||||
// This is a catch-all, better to avoid at call site
|
||||
if( agent_id.isNull() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// </FS:Beq>
|
||||
if (mRunning)
|
||||
{
|
||||
// ...only do immediate lookups when cache is running
|
||||
|
|
|
|||
|
|
@ -258,7 +258,11 @@ std::string LLInvFVBridge::getSearchableCreatorName() const
|
|||
if(item)
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(item->getCreatorUUID(), &av_name))
|
||||
// <FS:Beq> Avoid null id requests entering name cache
|
||||
// if (LLAvatarNameCache::get(item->getCreatorUUID(), &av_name))
|
||||
const auto& creatorId {item->getCreatorUUID()};
|
||||
if ( creatorId.notNull() && LLAvatarNameCache::get(creatorId, &av_name) )
|
||||
// </FS:Beq>
|
||||
{
|
||||
std::string username = av_name.getUserName();
|
||||
LLStringUtil::toUpper(username);
|
||||
|
|
|
|||
|
|
@ -324,7 +324,10 @@ std::string LLHandlerUtil::getSubstitutionName(const LLNotificationPtr& notifica
|
|||
from_id = notification->getPayload()["from_id"];
|
||||
}
|
||||
LLAvatarName av_name;
|
||||
if(LLAvatarNameCache::get(from_id, &av_name))
|
||||
// <FS:Beq> Avoid null UUID name cache requests
|
||||
// if(LLAvatarNameCache::get(from_id, &av_name))
|
||||
if( from_id.notNull() && LLAvatarNameCache::get(from_id, &av_name) )
|
||||
// </FS:Beq>
|
||||
{
|
||||
res = av_name.getUserName();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue