From f656adee31f5210acb4d1c8c89fe0d1e9362feee Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 20 Nov 2012 10:22:49 +0000 Subject: 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. --- .../ServiceConnectorsOut/Presence/BasePresenceServiceConnector.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/BasePresenceServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/BasePresenceServiceConnector.cs index c84518d..fdbe10a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/BasePresenceServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/BasePresenceServiceConnector.cs @@ -125,6 +125,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence 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); } -- cgit v1.1