diff options
author | Justin Clarke Casey | 2009-01-21 21:14:17 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-01-21 21:14:17 +0000 |
commit | 37fa6775488ab237a4537d49b92a8d52b0497b98 (patch) | |
tree | 805183f2f807a8a051ba64878c079fb0a8c7fe17 /OpenSim/Region/Environment/Scenes | |
parent | * Restore commented out isdone assertions in TextureSendTests.T010_SendPkg() (diff) | |
download | opensim-SC_OLD-37fa6775488ab237a4537d49b92a8d52b0497b98.zip opensim-SC_OLD-37fa6775488ab237a4537d49b92a8d52b0497b98.tar.gz opensim-SC_OLD-37fa6775488ab237a4537d49b92a8d52b0497b98.tar.bz2 opensim-SC_OLD-37fa6775488ab237a4537d49b92a8d52b0497b98.tar.xz |
* refactor: Extract caps related code from scene and put into a region module
* No functional changes in this revision
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
8 files changed, 35 insertions, 174 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs index a652609..76d1cba 100644 --- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs | |||
@@ -228,7 +228,7 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
228 | else | 228 | else |
229 | { | 229 | { |
230 | // child agent already there | 230 | // child agent already there |
231 | agentCircuit.CapsPath = avatar.Scene.GetChildSeed(avatar.UUID, reg.RegionHandle); | 231 | agentCircuit.CapsPath = avatar.Scene.CapsModule.GetChildSeed(avatar.UUID, reg.RegionHandle); |
232 | capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort | 232 | capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort |
233 | + "/CAPS/" + agentCircuit.CapsPath + "0000/"; | 233 | + "/CAPS/" + agentCircuit.CapsPath + "0000/"; |
234 | } | 234 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 404a7c3..58ab058 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
214 | /// <summary> | 214 | /// <summary> |
215 | /// <see>CapsUpdatedInventoryItemAsset(IClientAPI, UUID, byte[])</see> | 215 | /// <see>CapsUpdatedInventoryItemAsset(IClientAPI, UUID, byte[])</see> |
216 | /// </summary> | 216 | /// </summary> |
217 | private UUID CapsUpdateInventoryItemAsset(UUID avatarId, UUID itemID, byte[] data) | 217 | public UUID CapsUpdateInventoryItemAsset(UUID avatarId, UUID itemID, byte[] data) |
218 | { | 218 | { |
219 | ScenePresence avatar; | 219 | ScenePresence avatar; |
220 | 220 | ||
@@ -305,7 +305,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
305 | /// <summary> | 305 | /// <summary> |
306 | /// <see>CapsUpdateTaskInventoryScriptAsset(IClientAPI, UUID, UUID, bool, byte[])</see> | 306 | /// <see>CapsUpdateTaskInventoryScriptAsset(IClientAPI, UUID, UUID, bool, byte[])</see> |
307 | /// </summary> | 307 | /// </summary> |
308 | private void CapsUpdateTaskInventoryScriptAsset(UUID avatarId, UUID itemId, | 308 | public void CapsUpdateTaskInventoryScriptAsset(UUID avatarId, UUID itemId, |
309 | UUID primId, bool isScriptRunning, byte[] data) | 309 | UUID primId, bool isScriptRunning, byte[] data) |
310 | { | 310 | { |
311 | ScenePresence avatar; | 311 | ScenePresence avatar; |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 8a9d295..3a0bbc3 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -113,11 +113,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
113 | get { return m_sceneGridService; } | 113 | get { return m_sceneGridService; } |
114 | } | 114 | } |
115 | 115 | ||
116 | /// <summary> | ||
117 | /// Each agent has its own capabilities handler. | ||
118 | /// </summary> | ||
119 | protected Dictionary<UUID, Caps> m_capsHandlers = new Dictionary<UUID, Caps>(); | ||
120 | |||
121 | /// <value> | 116 | /// <value> |
122 | /// All the region modules attached to this scene. | 117 | /// All the region modules attached to this scene. |
123 | /// </value> | 118 | /// </value> |
@@ -147,7 +142,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
147 | protected IInterregionCommsOut m_interregionCommsOut; | 142 | protected IInterregionCommsOut m_interregionCommsOut; |
148 | protected IInterregionCommsIn m_interregionCommsIn; | 143 | protected IInterregionCommsIn m_interregionCommsIn; |
149 | protected IDialogModule m_dialogModule; | 144 | protected IDialogModule m_dialogModule; |
150 | 145 | protected internal ICapabilitiesModule CapsModule; | |
146 | |||
151 | // Central Update Loop | 147 | // Central Update Loop |
152 | 148 | ||
153 | protected int m_fps = 10; | 149 | protected int m_fps = 10; |
@@ -342,7 +338,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
342 | 338 | ||
343 | RegisterDefaultSceneEvents(); | 339 | RegisterDefaultSceneEvents(); |
344 | 340 | ||
345 | m_dumpAssetsToFile = dumpAssetsToFile; | 341 | DumpAssetsToFile = dumpAssetsToFile; |
346 | 342 | ||
347 | m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts; | 343 | m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts; |
348 | 344 | ||
@@ -780,6 +776,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
780 | m_interregionCommsOut = RequestModuleInterface<IInterregionCommsOut>(); | 776 | m_interregionCommsOut = RequestModuleInterface<IInterregionCommsOut>(); |
781 | m_interregionCommsIn = RequestModuleInterface<IInterregionCommsIn>(); | 777 | m_interregionCommsIn = RequestModuleInterface<IInterregionCommsIn>(); |
782 | m_dialogModule = RequestModuleInterface<IDialogModule>(); | 778 | m_dialogModule = RequestModuleInterface<IDialogModule>(); |
779 | CapsModule = RequestModuleInterface<ICapabilitiesModule>(); | ||
783 | } | 780 | } |
784 | 781 | ||
785 | #endregion | 782 | #endregion |
@@ -2578,7 +2575,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2578 | (childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName); | 2575 | (childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName); |
2579 | 2576 | ||
2580 | m_sceneGraph.removeUserCount(!childagentYN); | 2577 | m_sceneGraph.removeUserCount(!childagentYN); |
2581 | RemoveCapsHandler(agentID); | 2578 | CapsModule.RemoveCapsHandler(agentID); |
2582 | 2579 | ||
2583 | if (avatar.Scene.NeedSceneCacheClear(avatar.UUID)) | 2580 | if (avatar.Scene.NeedSceneCacheClear(avatar.UUID)) |
2584 | { | 2581 | { |
@@ -2759,9 +2756,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2759 | /// <param name="agent"></param> | 2756 | /// <param name="agent"></param> |
2760 | public void NewUserConnection(AgentCircuitData agent) | 2757 | public void NewUserConnection(AgentCircuitData agent) |
2761 | { | 2758 | { |
2762 | /// Diva: Horrible stuff! | 2759 | CapsModule.NewUserConnection(agent); |
2763 | capsPaths[agent.AgentID] = agent.CapsPath; | ||
2764 | childrenSeeds[agent.AgentID] = ((agent.ChildrenCapSeeds == null) ? new Dictionary<ulong, string>() : agent.ChildrenCapSeeds); | ||
2765 | 2760 | ||
2766 | ScenePresence sp = m_sceneGraph.GetScenePresence(agent.AgentID); | 2761 | ScenePresence sp = m_sceneGraph.GetScenePresence(agent.AgentID); |
2767 | if (sp != null) | 2762 | if (sp != null) |
@@ -2786,8 +2781,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2786 | "[CONNECTION BEGIN]: Denied access to: {0} at {1} because the user is on the region banlist", | 2781 | "[CONNECTION BEGIN]: Denied access to: {0} at {1} because the user is on the region banlist", |
2787 | agent.AgentID, RegionInfo.RegionName); | 2782 | agent.AgentID, RegionInfo.RegionName); |
2788 | } | 2783 | } |
2789 | 2784 | ||
2790 | AddCapsHandler(agent.AgentID); | 2785 | CapsModule.AddCapsHandler(agent.AgentID); |
2791 | 2786 | ||
2792 | if (!agent.child) | 2787 | if (!agent.child) |
2793 | { | 2788 | { |
@@ -2860,88 +2855,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
2860 | } | 2855 | } |
2861 | 2856 | ||
2862 | /// <summary> | 2857 | /// <summary> |
2863 | /// Add a caps handler for the given agent. If the CAPS handler already exists for this agent, | ||
2864 | /// then it is replaced by a new CAPS handler. | ||
2865 | /// | ||
2866 | /// FIXME: On login this is called twice, once for the login and once when the connection is made. | ||
2867 | /// This is somewhat innefficient and should be fixed. The initial login creation is necessary | ||
2868 | /// since the client asks for capabilities immediately after being informed of the seed. | ||
2869 | /// </summary> | ||
2870 | /// <param name="agentId"></param> | ||
2871 | /// <param name="capsObjectPath"></param> | ||
2872 | public void AddCapsHandler(UUID agentId) | ||
2873 | { | ||
2874 | if (RegionInfo.EstateSettings.IsBanned(agentId)) | ||
2875 | return; | ||
2876 | |||
2877 | String capsObjectPath = GetCapsPath(agentId); | ||
2878 | |||
2879 | Caps cap = null; | ||
2880 | if (m_capsHandlers.TryGetValue(agentId, out cap)) | ||
2881 | { | ||
2882 | m_log.DebugFormat("[CAPS] Attempt at registering twice for the same agent {0}. {1}. Ignoring.", agentId, capsObjectPath); | ||
2883 | //return; | ||
2884 | } | ||
2885 | |||
2886 | cap | ||
2887 | = new Caps( | ||
2888 | AssetCache, CommsManager.HttpServer, m_regInfo.ExternalHostName, CommsManager.HttpServer.Port, | ||
2889 | capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName); | ||
2890 | |||
2891 | cap.RegisterHandlers(); | ||
2892 | |||
2893 | EventManager.TriggerOnRegisterCaps(agentId, cap); | ||
2894 | |||
2895 | cap.AddNewInventoryItem = AddUploadedInventoryItem; | ||
2896 | cap.ItemUpdatedCall = CapsUpdateInventoryItemAsset; | ||
2897 | cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset; | ||
2898 | cap.CAPSFetchInventoryDescendents = HandleFetchInventoryDescendentsCAPS; | ||
2899 | cap.GetClient = m_sceneGraph.GetControllingClient; | ||
2900 | m_capsHandlers[agentId] = cap; | ||
2901 | } | ||
2902 | |||
2903 | public Caps GetCapsHandlerForUser(UUID agentId) | ||
2904 | { | ||
2905 | lock (m_capsHandlers) | ||
2906 | { | ||
2907 | if (m_capsHandlers.ContainsKey(agentId)) | ||
2908 | { | ||
2909 | return m_capsHandlers[agentId]; | ||
2910 | } | ||
2911 | } | ||
2912 | return null; | ||
2913 | } | ||
2914 | |||
2915 | /// <summary> | ||
2916 | /// Remove the caps handler for a given agent. | ||
2917 | /// </summary> | ||
2918 | /// <param name="agentId"></param> | ||
2919 | public void RemoveCapsHandler(UUID agentId) | ||
2920 | { | ||
2921 | if (childrenSeeds.ContainsKey(agentId)) | ||
2922 | { | ||
2923 | childrenSeeds.Remove(agentId); | ||
2924 | } | ||
2925 | |||
2926 | lock (m_capsHandlers) | ||
2927 | { | ||
2928 | if (m_capsHandlers.ContainsKey(agentId)) | ||
2929 | { | ||
2930 | m_capsHandlers[agentId].DeregisterHandlers(); | ||
2931 | EventManager.TriggerOnDeregisterCaps(agentId, m_capsHandlers[agentId]); | ||
2932 | |||
2933 | m_capsHandlers.Remove(agentId); | ||
2934 | } | ||
2935 | else | ||
2936 | { | ||
2937 | m_log.WarnFormat( | ||
2938 | "[CAPS]: Received request to remove CAPS handler for root agent {0} in {1}, but no such CAPS handler found!", | ||
2939 | agentId, RegionInfo.RegionName); | ||
2940 | } | ||
2941 | } | ||
2942 | } | ||
2943 | |||
2944 | /// <summary> | ||
2945 | /// Triggered when an agent crosses into this sim. Also happens on initial login. | 2858 | /// Triggered when an agent crosses into this sim. Also happens on initial login. |
2946 | /// </summary> | 2859 | /// </summary> |
2947 | /// <param name="agentID"></param> | 2860 | /// <param name="agentID"></param> |
@@ -3740,7 +3653,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3740 | #region Script Engine | 3653 | #region Script Engine |
3741 | 3654 | ||
3742 | private List<ScriptEngineInterface> ScriptEngines = new List<ScriptEngineInterface>(); | 3655 | private List<ScriptEngineInterface> ScriptEngines = new List<ScriptEngineInterface>(); |
3743 | private bool m_dumpAssetsToFile; | 3656 | public bool DumpAssetsToFile; |
3744 | 3657 | ||
3745 | /// <summary> | 3658 | /// <summary> |
3746 | /// | 3659 | /// |
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index fafa933..e6e2c93 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -215,67 +215,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
215 | #endregion | 215 | #endregion |
216 | 216 | ||
217 | /// <summary> | 217 | /// <summary> |
218 | /// XXX These two methods are very temporary | ||
219 | /// XXX Diva: this is really truly horrible; must...move...to...LL client...stack... | ||
220 | /// </summary> | ||
221 | protected Dictionary<UUID, string> capsPaths = new Dictionary<UUID, string>(); | ||
222 | protected Dictionary<UUID, Dictionary<ulong, string>> childrenSeeds = new Dictionary<UUID, Dictionary<ulong, string>>(); | ||
223 | public string GetCapsPath(UUID agentId) | ||
224 | { | ||
225 | if (capsPaths.ContainsKey(agentId)) | ||
226 | { | ||
227 | return capsPaths[agentId]; | ||
228 | } | ||
229 | |||
230 | return null; | ||
231 | } | ||
232 | public Dictionary<ulong, string> GetChildrenSeeds(UUID agentID) | ||
233 | { | ||
234 | Dictionary<ulong, string> seeds = null; | ||
235 | if (childrenSeeds.TryGetValue(agentID, out seeds)) | ||
236 | return seeds; | ||
237 | return new Dictionary<ulong, string>(); | ||
238 | } | ||
239 | |||
240 | public void DropChildSeed(UUID agentID, ulong handle) | ||
241 | { | ||
242 | Dictionary<ulong, string> seeds; | ||
243 | if (childrenSeeds.TryGetValue(agentID, out seeds)) | ||
244 | { | ||
245 | seeds.Remove(handle); | ||
246 | } | ||
247 | } | ||
248 | |||
249 | public string GetChildSeed(UUID agentID, ulong handle) | ||
250 | { | ||
251 | Dictionary<ulong, string> seeds; | ||
252 | if (childrenSeeds.TryGetValue(agentID, out seeds)) | ||
253 | { | ||
254 | return seeds[handle]; | ||
255 | } | ||
256 | return null; | ||
257 | } | ||
258 | |||
259 | public void SetChildrenSeed(UUID agentID, Dictionary<ulong, string> value) | ||
260 | { | ||
261 | //Console.WriteLine(" !!! Setting child seeds in {0} to {1}", RegionInfo.RegionName, value.Count); | ||
262 | childrenSeeds[agentID] = value; | ||
263 | } | ||
264 | |||
265 | public void DumpChildrenSeeds(UUID agentID) | ||
266 | { | ||
267 | Console.WriteLine("================ ChildrenSeed {0} ================", RegionInfo.RegionName); | ||
268 | foreach (KeyValuePair<ulong, string> kvp in childrenSeeds[agentID]) | ||
269 | { | ||
270 | uint x, y; | ||
271 | Utils.LongToUInts(kvp.Key, out x, out y); | ||
272 | x = x / Constants.RegionSize; | ||
273 | y = y / Constants.RegionSize; | ||
274 | Console.WriteLine(" >> {0}, {1}: {2}", x, y, kvp.Value); | ||
275 | } | ||
276 | } | ||
277 | |||
278 | /// <summary> | ||
279 | /// Returns a new unallocated local ID | 218 | /// Returns a new unallocated local ID |
280 | /// </summary> | 219 | /// </summary> |
281 | /// <returns>A brand new local ID</returns> | 220 | /// <returns>A brand new local ID</returns> |
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 | |||
359 | /// and the regions where there are already child agents. We only send notification to the former. | 359 | /// and the regions where there are already child agents. We only send notification to the former. |
360 | List<ulong> neighbourHandles = NeighbourHandles(neighbours); // on this region | 360 | List<ulong> neighbourHandles = NeighbourHandles(neighbours); // on this region |
361 | neighbourHandles.Add(avatar.Scene.RegionInfo.RegionHandle); // add this region too | 361 | neighbourHandles.Add(avatar.Scene.RegionInfo.RegionHandle); // add this region too |
362 | List<ulong> previousRegionNeighbourHandles = new List<ulong>(avatar.Scene.GetChildrenSeeds(avatar.UUID).Keys); | 362 | List<ulong> previousRegionNeighbourHandles |
363 | = new List<ulong>(avatar.Scene.CapsModule.GetChildrenSeeds(avatar.UUID).Keys); | ||
363 | List<ulong> newRegions = NewNeighbours(neighbourHandles, previousRegionNeighbourHandles); | 364 | List<ulong> newRegions = NewNeighbours(neighbourHandles, previousRegionNeighbourHandles); |
364 | List<ulong> oldRegions = OldNeighbours(neighbourHandles, previousRegionNeighbourHandles); | 365 | List<ulong> oldRegions = OldNeighbours(neighbourHandles, previousRegionNeighbourHandles); |
365 | 366 | ||
@@ -372,7 +373,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
372 | avatar.DropOldNeighbours(oldRegions); | 373 | avatar.DropOldNeighbours(oldRegions); |
373 | 374 | ||
374 | /// Collect as many seeds as possible | 375 | /// Collect as many seeds as possible |
375 | Dictionary<ulong, string> seeds = new Dictionary<ulong, string>(avatar.Scene.GetChildrenSeeds(avatar.UUID)); | 376 | Dictionary<ulong, string> seeds |
377 | = new Dictionary<ulong, string>(avatar.Scene.CapsModule.GetChildrenSeeds(avatar.UUID)); | ||
378 | |||
376 | //Console.WriteLine(" !!! No. of seeds: " + seeds.Count); | 379 | //Console.WriteLine(" !!! No. of seeds: " + seeds.Count); |
377 | if (!seeds.ContainsKey(avatar.Scene.RegionInfo.RegionHandle)) | 380 | if (!seeds.ContainsKey(avatar.Scene.RegionInfo.RegionHandle)) |
378 | seeds.Add(avatar.Scene.RegionInfo.RegionHandle, avatar.ControllingClient.RequestClientInfo().CapsPath); | 381 | seeds.Add(avatar.Scene.RegionInfo.RegionHandle, avatar.ControllingClient.RequestClientInfo().CapsPath); |
@@ -397,7 +400,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
397 | seeds.Add(neighbour.RegionHandle, agent.CapsPath); | 400 | seeds.Add(neighbour.RegionHandle, agent.CapsPath); |
398 | } | 401 | } |
399 | else | 402 | else |
400 | agent.CapsPath = avatar.Scene.GetChildSeed(avatar.UUID, neighbour.RegionHandle); | 403 | agent.CapsPath = avatar.Scene.CapsModule.GetChildSeed(avatar.UUID, neighbour.RegionHandle); |
401 | 404 | ||
402 | cagents.Add(agent); | 405 | cagents.Add(agent); |
403 | } | 406 | } |
@@ -409,7 +412,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
409 | a.ChildrenCapSeeds = new Dictionary<ulong, string>(seeds); | 412 | a.ChildrenCapSeeds = new Dictionary<ulong, string>(seeds); |
410 | } | 413 | } |
411 | // These two are the same thing! | 414 | // These two are the same thing! |
412 | avatar.Scene.SetChildrenSeed(avatar.UUID, seeds); | 415 | avatar.Scene.CapsModule.SetChildrenSeed(avatar.UUID, seeds); |
413 | avatar.KnownRegions = seeds; | 416 | avatar.KnownRegions = seeds; |
414 | //avatar.Scene.DumpChildrenSeeds(avatar.UUID); | 417 | //avatar.Scene.DumpChildrenSeeds(avatar.UUID); |
415 | //avatar.DumpKnownRegions(); | 418 | //avatar.DumpKnownRegions(); |
@@ -821,7 +824,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
821 | } | 824 | } |
822 | else | 825 | else |
823 | { | 826 | { |
824 | agentCircuit.CapsPath = avatar.Scene.GetChildSeed(avatar.UUID, reg.RegionHandle); | 827 | agentCircuit.CapsPath = avatar.Scene.CapsModule.GetChildSeed(avatar.UUID, reg.RegionHandle); |
825 | capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort | 828 | capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort |
826 | + "/CAPS/" + agentCircuit.CapsPath + "0000/"; | 829 | + "/CAPS/" + agentCircuit.CapsPath + "0000/"; |
827 | } | 830 | } |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 2099e9a..02d3642 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -510,7 +510,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
510 | 510 | ||
511 | public void AdjustKnownSeeds() | 511 | public void AdjustKnownSeeds() |
512 | { | 512 | { |
513 | Dictionary<ulong, string> seeds = Scene.GetChildrenSeeds(UUID); | 513 | Dictionary<ulong, string> seeds = Scene.CapsModule.GetChildrenSeeds(UUID); |
514 | List<ulong> old = new List<ulong>(); | 514 | List<ulong> old = new List<ulong>(); |
515 | foreach (ulong handle in seeds.Keys) | 515 | foreach (ulong handle in seeds.Keys) |
516 | { | 516 | { |
@@ -524,7 +524,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
524 | } | 524 | } |
525 | } | 525 | } |
526 | DropOldNeighbours(old); | 526 | DropOldNeighbours(old); |
527 | Scene.SetChildrenSeed(UUID, seeds); | 527 | Scene.CapsModule.SetChildrenSeed(UUID, seeds); |
528 | KnownRegions = seeds; | 528 | KnownRegions = seeds; |
529 | //Console.WriteLine(" ++++++++++AFTER+++++++++++++ "); | 529 | //Console.WriteLine(" ++++++++++AFTER+++++++++++++ "); |
530 | //DumpKnownRegions(); | 530 | //DumpKnownRegions(); |
@@ -848,8 +848,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
848 | //SendAnimPack(); | 848 | //SendAnimPack(); |
849 | 849 | ||
850 | m_scene.SwapRootAgentCount(false); | 850 | m_scene.SwapRootAgentCount(false); |
851 | m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(m_uuid); | 851 | m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(m_uuid); |
852 | m_scene.AddCapsHandler(m_uuid); | 852 | m_scene.CapsModule.AddCapsHandler(m_uuid); |
853 | 853 | ||
854 | // On the next prim update, all objects will be sent | 854 | // On the next prim update, all objects will be sent |
855 | // | 855 | // |
@@ -969,7 +969,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
969 | foreach (ulong handle in oldRegions) | 969 | foreach (ulong handle in oldRegions) |
970 | { | 970 | { |
971 | RemoveNeighbourRegion(handle); | 971 | RemoveNeighbourRegion(handle); |
972 | Scene.DropChildSeed(UUID, handle); | 972 | Scene.CapsModule.DropChildSeed(UUID, handle); |
973 | } | 973 | } |
974 | } | 974 | } |
975 | 975 | ||
@@ -2494,14 +2494,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
2494 | { | 2494 | { |
2495 | // Restore the user structures that we needed to delete before asking the receiving region to complete the crossing | 2495 | // Restore the user structures that we needed to delete before asking the receiving region to complete the crossing |
2496 | m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(UUID); | 2496 | m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(UUID); |
2497 | m_scene.AddCapsHandler(UUID); | 2497 | m_scene.CapsModule.AddCapsHandler(UUID); |
2498 | } | 2498 | } |
2499 | } | 2499 | } |
2500 | 2500 | ||
2501 | //Console.WriteLine("AFTER CROSS"); | 2501 | //Console.WriteLine("AFTER CROSS"); |
2502 | //Scene.DumpChildrenSeeds(UUID); | 2502 | //Scene.DumpChildrenSeeds(UUID); |
2503 | //DumpKnownRegions(); | 2503 | //DumpKnownRegions(); |
2504 | |||
2505 | } | 2504 | } |
2506 | 2505 | ||
2507 | /// <summary> | 2506 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs index 5fa897c..dee3914 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs | |||
@@ -34,6 +34,8 @@ using OpenSim.Framework.Communications.Cache; | |||
34 | using OpenSim.Framework.Servers; | 34 | using OpenSim.Framework.Servers; |
35 | using OpenSim.Region.Physics.Manager; | 35 | using OpenSim.Region.Physics.Manager; |
36 | using OpenSim.Region.Environment; | 36 | using OpenSim.Region.Environment; |
37 | using OpenSim.Region.Environment.Interfaces; | ||
38 | using OpenSim.Region.Environment.Modules.Agent.Capabilities; | ||
37 | using OpenSim.Region.Environment.Scenes; | 39 | using OpenSim.Region.Environment.Scenes; |
38 | using OpenSim.Tests.Common.Mock; | 40 | using OpenSim.Tests.Common.Mock; |
39 | 41 | ||
@@ -79,6 +81,11 @@ namespace OpenSim.Region.Environment.Scenes.Tests | |||
79 | 81 | ||
80 | TestScene testScene = new TestScene( | 82 | TestScene testScene = new TestScene( |
81 | regInfo, acm, cm, scs, ac, sm, null, false, false, false, configSource, null); | 83 | regInfo, acm, cm, scs, ac, sm, null, false, false, false, configSource, null); |
84 | |||
85 | IRegionModule capsModule = new CapabilitiesModule(); | ||
86 | capsModule.Initialise(testScene, new IniConfigSource()); | ||
87 | testScene.AddModule(capsModule.Name, capsModule); | ||
88 | testScene.SetModuleInterfaces(); | ||
82 | 89 | ||
83 | testScene.LandChannel = new TestLandChannel(); | 90 | testScene.LandChannel = new TestLandChannel(); |
84 | testScene.LoadWorldMap(); | 91 | testScene.LoadWorldMap(); |
diff --git a/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs index d7342de..a61b9c2 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs | |||
@@ -63,13 +63,13 @@ namespace OpenSim.Region.Environment.Scenes.Tests | |||
63 | // TODO: Clean this up | 63 | // TODO: Clean this up |
64 | Scene sceneA = SceneTestUtils.SetupScene("sceneA", sceneAId, 1000, 1000, cm); | 64 | Scene sceneA = SceneTestUtils.SetupScene("sceneA", sceneAId, 1000, 1000, cm); |
65 | interregionComms.Initialise(sceneA, new IniConfigSource()); | 65 | interregionComms.Initialise(sceneA, new IniConfigSource()); |
66 | sceneA.AddModule(interregionComms.Name, interregionComms); | 66 | sceneA.AddModule(interregionComms.Name, interregionComms); |
67 | sceneA.SetModuleInterfaces(); | 67 | sceneA.SetModuleInterfaces(); |
68 | sceneA.RegisterRegionWithGrid(); | 68 | sceneA.RegisterRegionWithGrid(); |
69 | 69 | ||
70 | // TODO: Clean this up | 70 | // TODO: Clean this up |
71 | Scene sceneB = SceneTestUtils.SetupScene("sceneB", sceneBId, 1010, 1010, cm); | 71 | Scene sceneB = SceneTestUtils.SetupScene("sceneB", sceneBId, 1010, 1010, cm); |
72 | interregionComms.Initialise(sceneB, new IniConfigSource()); | 72 | interregionComms.Initialise(sceneB, new IniConfigSource()); |
73 | sceneB.AddModule(interregionComms.Name, interregionComms); | 73 | sceneB.AddModule(interregionComms.Name, interregionComms); |
74 | sceneB.SetModuleInterfaces(); | 74 | sceneB.SetModuleInterfaces(); |
75 | sceneB.RegisterRegionWithGrid(); | 75 | sceneB.RegisterRegionWithGrid(); |