[OpenSim] Fix name lookup fails (on the agent only?) when a grid does not have NameLookupURL

This commit is contained in:
Inusaito Sayori
2014-12-17 08:46:21 -05:00
parent ca8aa4dc0a
commit 78131d2d53

View File

@@ -609,6 +609,17 @@ bool LLAvatarNameCache::get(const LLUUID& agent_id, LLAvatarName *av_name)
return true;
}
else if (!hasNameLookupURL())
{
std::string full_name;
if (gCacheName->getFullName(agent_id, full_name))
{
LLAvatarName av_name;
av_name.fromString(full_name);
sCache[agent_id] = av_name;
return true;
}
}
}
if (!isRequestPending(agent_id))
@@ -666,6 +677,18 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& ag
return connection;
}
}
else if (!hasNameLookupURL())
{
std::string full_name;
if (gCacheName->getFullName(agent_id, full_name))
{
LLAvatarName av_name;
av_name.fromString(full_name);
sCache[agent_id] = av_name;
fireSignal(agent_id, slot, av_name);
return connection;
}
}
}
// schedule a request