If GetAgents() is called with an empty userIDs array then don't bother with a useless potentially network call on the scene presence service connector.

This also eliminates the "[PRESENCE HANDLER]: GetAgents called without required uuids argument"
which has started to pop up in the logs when a call is made with an empty uuid array as occasionally happens.
connector_plugin
Justin Clark-Casey (justincc) 2012-11-20 10:22:49 +00:00
parent ea65a64f7b
commit f656adee31
1 changed files with 4 additions and 0 deletions

View File

@ -125,6 +125,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
public PresenceInfo[] GetAgents(string[] userIDs) public PresenceInfo[] GetAgents(string[] userIDs)
{ {
// Don't bother potentially making a useless network call if we not going to ask for any users anyway.
if (userIDs.Length == 0)
return new PresenceInfo[0];
return m_PresenceService.GetAgents(userIDs); return m_PresenceService.GetAgents(userIDs);
} }