From f34cc6b46949033803c79235b9d82da9bf9634dd Mon Sep 17 00:00:00 2001 From: Thomas Grimshaw Date: Mon, 5 Apr 2010 22:08:34 +0200 Subject: Add a much cheaper agent count retrieval method. This is obsoleted by 0.7 so it can be reverted then. --- OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs | 2 +- OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest') diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs index ed18207..dea166d 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs @@ -192,7 +192,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions protected string RegionStats(OSHttpResponse httpResponse, Scene scene) { - int users = scene.GetAvatars().Count; + int users = scene.GetRootAgentCount(); int objects = scene.Entities.Count - users; RestXmlWriter rxw = new RestXmlWriter(new StringWriter()); diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs index 5798286..82e9d9b 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs @@ -125,7 +125,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions rxw.WriteString(s.RegionInfo.InternalEndPoint.ToString()); rxw.WriteEndAttribute(); - int users = s.GetAvatars().Count; + int users = s.GetRootAgentCount(); rxw.WriteStartAttribute(String.Empty, "avatars", String.Empty); rxw.WriteValue(users); rxw.WriteEndAttribute(); -- cgit v1.1