diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index c2f9c3ab7b..3be97b5c89 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs @@ -181,7 +181,6 @@ namespace OpenSim.Framework.Capabilities RegisterRegionServiceHandlers(capsBase); RegisterInventoryServiceHandlers(capsBase); - } public void RegisterRegionServiceHandlers(string capsBase) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e0af2d6709..ee1e0beee4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3010,7 +3010,9 @@ namespace OpenSim.Region.Framework.Scenes (childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName); m_sceneGraph.removeUserCount(!childagentYN); - CapsModule.RemoveCapsHandler(agentID); + + if (CapsModule != null) + CapsModule.RemoveCapsHandler(agentID); // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever // this method is doing is HORRIBLE!!! @@ -3265,8 +3267,11 @@ namespace OpenSim.Region.Framework.Scenes RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, agent.AgentID, agent.circuitcode); - CapsModule.NewUserConnection(agent); - CapsModule.AddCapsHandler(agent.AgentID); + if (CapsModule != null) + { + CapsModule.NewUserConnection(agent); + CapsModule.AddCapsHandler(agent.AgentID); + } } else { @@ -3281,7 +3286,9 @@ namespace OpenSim.Region.Framework.Scenes agent.AgentID, RegionInfo.RegionName); sp.AdjustKnownSeeds(); - CapsModule.NewUserConnection(agent); + + if (CapsModule != null) + CapsModule.NewUserConnection(agent); } } diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index dc0d4deb18..ebe0a72a87 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -560,8 +560,11 @@ namespace OpenSim.Tests.Common.Mock agentData.lastname = m_lastName; ICapabilitiesModule capsModule = m_scene.RequestModuleInterface(); - agentData.CapsPath = capsModule.GetCapsPath(m_agentId); - agentData.ChildrenCapSeeds = new Dictionary(capsModule.GetChildrenSeeds(m_agentId)); + if (capsModule != null) + { + agentData.CapsPath = capsModule.GetCapsPath(m_agentId); + agentData.ChildrenCapSeeds = new Dictionary(capsModule.GetChildrenSeeds(m_agentId)); + } return agentData; } diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index d199e42440..91426166e0 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs @@ -164,10 +164,10 @@ namespace OpenSim.Tests.Common.Setup TestScene testScene = new TestScene( regInfo, acm, scs, simDataService, estateDataService, null, false, false, false, configSource, null); - INonSharedRegionModule capsModule = new CapabilitiesModule(); - capsModule.Initialise(new IniConfigSource()); - testScene.AddRegionModule(capsModule.Name, capsModule); - capsModule.AddRegion(testScene); +// INonSharedRegionModule capsModule = new CapabilitiesModule(); +// capsModule.Initialise(new IniConfigSource()); +// testScene.AddRegionModule(capsModule.Name, capsModule); +// capsModule.AddRegion(testScene); IRegionModule godsModule = new GodsModule(); godsModule.Initialise(testScene, new IniConfigSource());