Put some CapabilitiesModule null checks in Scene
Stop tests setting up a capabilities module by default0.7.1-dev
parent
8249d77991
commit
60fe3d48ee
|
@ -181,7 +181,6 @@ namespace OpenSim.Framework.Capabilities
|
||||||
|
|
||||||
RegisterRegionServiceHandlers(capsBase);
|
RegisterRegionServiceHandlers(capsBase);
|
||||||
RegisterInventoryServiceHandlers(capsBase);
|
RegisterInventoryServiceHandlers(capsBase);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegisterRegionServiceHandlers(string capsBase)
|
public void RegisterRegionServiceHandlers(string capsBase)
|
||||||
|
|
|
@ -3010,6 +3010,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
(childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName);
|
(childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName);
|
||||||
|
|
||||||
m_sceneGraph.removeUserCount(!childagentYN);
|
m_sceneGraph.removeUserCount(!childagentYN);
|
||||||
|
|
||||||
|
if (CapsModule != null)
|
||||||
CapsModule.RemoveCapsHandler(agentID);
|
CapsModule.RemoveCapsHandler(agentID);
|
||||||
|
|
||||||
// REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever
|
// REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever
|
||||||
|
@ -3265,9 +3267,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname,
|
RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname,
|
||||||
agent.AgentID, agent.circuitcode);
|
agent.AgentID, agent.circuitcode);
|
||||||
|
|
||||||
|
if (CapsModule != null)
|
||||||
|
{
|
||||||
CapsModule.NewUserConnection(agent);
|
CapsModule.NewUserConnection(agent);
|
||||||
CapsModule.AddCapsHandler(agent.AgentID);
|
CapsModule.AddCapsHandler(agent.AgentID);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Let the SP know how we got here. This has a lot of interesting
|
// Let the SP know how we got here. This has a lot of interesting
|
||||||
|
@ -3281,6 +3286,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
agent.AgentID, RegionInfo.RegionName);
|
agent.AgentID, RegionInfo.RegionName);
|
||||||
|
|
||||||
sp.AdjustKnownSeeds();
|
sp.AdjustKnownSeeds();
|
||||||
|
|
||||||
|
if (CapsModule != null)
|
||||||
CapsModule.NewUserConnection(agent);
|
CapsModule.NewUserConnection(agent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -560,8 +560,11 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
agentData.lastname = m_lastName;
|
agentData.lastname = m_lastName;
|
||||||
|
|
||||||
ICapabilitiesModule capsModule = m_scene.RequestModuleInterface<ICapabilitiesModule>();
|
ICapabilitiesModule capsModule = m_scene.RequestModuleInterface<ICapabilitiesModule>();
|
||||||
|
if (capsModule != null)
|
||||||
|
{
|
||||||
agentData.CapsPath = capsModule.GetCapsPath(m_agentId);
|
agentData.CapsPath = capsModule.GetCapsPath(m_agentId);
|
||||||
agentData.ChildrenCapSeeds = new Dictionary<ulong, string>(capsModule.GetChildrenSeeds(m_agentId));
|
agentData.ChildrenCapSeeds = new Dictionary<ulong, string>(capsModule.GetChildrenSeeds(m_agentId));
|
||||||
|
}
|
||||||
|
|
||||||
return agentData;
|
return agentData;
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,10 +164,10 @@ namespace OpenSim.Tests.Common.Setup
|
||||||
TestScene testScene = new TestScene(
|
TestScene testScene = new TestScene(
|
||||||
regInfo, acm, scs, simDataService, estateDataService, null, false, false, false, configSource, null);
|
regInfo, acm, scs, simDataService, estateDataService, null, false, false, false, configSource, null);
|
||||||
|
|
||||||
INonSharedRegionModule capsModule = new CapabilitiesModule();
|
// INonSharedRegionModule capsModule = new CapabilitiesModule();
|
||||||
capsModule.Initialise(new IniConfigSource());
|
// capsModule.Initialise(new IniConfigSource());
|
||||||
testScene.AddRegionModule(capsModule.Name, capsModule);
|
// testScene.AddRegionModule(capsModule.Name, capsModule);
|
||||||
capsModule.AddRegion(testScene);
|
// capsModule.AddRegion(testScene);
|
||||||
|
|
||||||
IRegionModule godsModule = new GodsModule();
|
IRegionModule godsModule = new GodsModule();
|
||||||
godsModule.Initialise(testScene, new IniConfigSource());
|
godsModule.Initialise(testScene, new IniConfigSource());
|
||||||
|
|
Loading…
Reference in New Issue