From 859bc717a4fe4cd5810ad9889cfb9b1e7f5c2046 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Fri, 19 Mar 2010 05:51:16 -0700 Subject: Cleaned up access to scenepresences in scenegraph. GetScenePresences and GetAvatars have been removed to consolidate locking and iteration within SceneGraph. All callers which used these to then iterate over presences have been refactored to instead pass their delegates to Scene.ForEachScenePresence(Action). --- 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/Regions') 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 734b668..279db4c 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs @@ -117,7 +117,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