From 37fa6775488ab237a4537d49b92a8d52b0497b98 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 21 Jan 2009 21:14:17 +0000 Subject: * refactor: Extract caps related code from scene and put into a region module * No functional changes in this revision --- .../Region/Environment/Scenes/SceneCommunicationService.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 596862b..9935512 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -359,7 +359,8 @@ namespace OpenSim.Region.Environment.Scenes /// and the regions where there are already child agents. We only send notification to the former. List neighbourHandles = NeighbourHandles(neighbours); // on this region neighbourHandles.Add(avatar.Scene.RegionInfo.RegionHandle); // add this region too - List previousRegionNeighbourHandles = new List(avatar.Scene.GetChildrenSeeds(avatar.UUID).Keys); + List previousRegionNeighbourHandles + = new List(avatar.Scene.CapsModule.GetChildrenSeeds(avatar.UUID).Keys); List newRegions = NewNeighbours(neighbourHandles, previousRegionNeighbourHandles); List oldRegions = OldNeighbours(neighbourHandles, previousRegionNeighbourHandles); @@ -372,7 +373,9 @@ namespace OpenSim.Region.Environment.Scenes avatar.DropOldNeighbours(oldRegions); /// Collect as many seeds as possible - Dictionary seeds = new Dictionary(avatar.Scene.GetChildrenSeeds(avatar.UUID)); + Dictionary seeds + = new Dictionary(avatar.Scene.CapsModule.GetChildrenSeeds(avatar.UUID)); + //Console.WriteLine(" !!! No. of seeds: " + seeds.Count); if (!seeds.ContainsKey(avatar.Scene.RegionInfo.RegionHandle)) seeds.Add(avatar.Scene.RegionInfo.RegionHandle, avatar.ControllingClient.RequestClientInfo().CapsPath); @@ -397,7 +400,7 @@ namespace OpenSim.Region.Environment.Scenes seeds.Add(neighbour.RegionHandle, agent.CapsPath); } else - agent.CapsPath = avatar.Scene.GetChildSeed(avatar.UUID, neighbour.RegionHandle); + agent.CapsPath = avatar.Scene.CapsModule.GetChildSeed(avatar.UUID, neighbour.RegionHandle); cagents.Add(agent); } @@ -409,7 +412,7 @@ namespace OpenSim.Region.Environment.Scenes a.ChildrenCapSeeds = new Dictionary(seeds); } // These two are the same thing! - avatar.Scene.SetChildrenSeed(avatar.UUID, seeds); + avatar.Scene.CapsModule.SetChildrenSeed(avatar.UUID, seeds); avatar.KnownRegions = seeds; //avatar.Scene.DumpChildrenSeeds(avatar.UUID); //avatar.DumpKnownRegions(); @@ -821,7 +824,7 @@ namespace OpenSim.Region.Environment.Scenes } else { - agentCircuit.CapsPath = avatar.Scene.GetChildSeed(avatar.UUID, reg.RegionHandle); + agentCircuit.CapsPath = avatar.Scene.CapsModule.GetChildSeed(avatar.UUID, reg.RegionHandle); capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + agentCircuit.CapsPath + "0000/"; } -- cgit v1.1