* refactor: Remove the need to separately pass in the http listener to the scene - this is always available via CommsManager

0.6.2-post-fixes
Justin Clarke Casey 2009-01-06 15:09:52 +00:00
parent fde6a1665c
commit b6ee2f15ba
7 changed files with 23 additions and 23 deletions

View File

@ -129,11 +129,12 @@ namespace OpenSim
AgentCircuitManager circuitManager) AgentCircuitManager circuitManager)
{ {
HGSceneCommunicationService sceneGridService = new HGSceneCommunicationService(m_commsManager, HGServices); HGSceneCommunicationService sceneGridService = new HGSceneCommunicationService(m_commsManager, HGServices);
return return
new HGScene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, new HGScene(
storageManager, m_httpServer, regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, storageManager,
m_moduleLoader, m_configSettings.DumpAssetsToFile, m_configSettings.PhysicalPrim, m_configSettings.See_into_region_from_neighbor, m_config.Source, m_moduleLoader, m_configSettings.DumpAssetsToFile, m_configSettings.PhysicalPrim,
m_version); m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
} }
public override void RunCmd(string command, string[] cmdparams) public override void RunCmd(string command, string[] cmdparams)

View File

@ -467,11 +467,11 @@ namespace OpenSim
AgentCircuitManager circuitManager) AgentCircuitManager circuitManager)
{ {
SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager);
return
new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, return new Scene(
storageManager, m_httpServer, regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache,
m_moduleLoader, m_configSettings.DumpAssetsToFile, m_configSettings.PhysicalPrim, m_configSettings.See_into_region_from_neighbor, m_config.Source, storageManager, m_moduleLoader, m_configSettings.DumpAssetsToFile, m_configSettings.PhysicalPrim,
m_version); m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
} }
public void handleRestartRegion(RegionInfo whichRegion) public void handleRestartRegion(RegionInfo whichRegion)

View File

@ -58,10 +58,10 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid
public HGScene(RegionInfo regInfo, AgentCircuitManager authen, public HGScene(RegionInfo regInfo, AgentCircuitManager authen,
CommunicationsManager commsMan, SceneCommunicationService sceneGridService, CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, AssetCache assetCach, StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
: base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, httpServer, moduleLoader, : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader,
dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion) dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
{ {
m_log.Info("[HGScene]: Starting HGScene."); m_log.Info("[HGScene]: Starting HGScene.");

View File

@ -120,8 +120,6 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
protected Dictionary<UUID, Caps> m_capsHandlers = new Dictionary<UUID, Caps>(); protected Dictionary<UUID, Caps> m_capsHandlers = new Dictionary<UUID, Caps>();
protected BaseHttpServer m_httpListener;
/// <value> /// <value>
/// All the region modules attached to this scene. /// All the region modules attached to this scene.
/// </value> /// </value>
@ -300,7 +298,7 @@ namespace OpenSim.Region.Environment.Scenes
public Scene(RegionInfo regInfo, AgentCircuitManager authen, public Scene(RegionInfo regInfo, AgentCircuitManager authen,
CommunicationsManager commsMan, SceneCommunicationService sceneGridService, CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, AssetCache assetCach, StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
{ {
@ -351,7 +349,6 @@ namespace OpenSim.Region.Environment.Scenes
RegisterDefaultSceneEvents(); RegisterDefaultSceneEvents();
m_httpListener = httpServer;
m_dumpAssetsToFile = dumpAssetsToFile; m_dumpAssetsToFile = dumpAssetsToFile;
m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts; m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts;
@ -2874,8 +2871,11 @@ namespace OpenSim.Region.Environment.Scenes
return; return;
} }
cap = new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, cap
capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName); = new Caps(
AssetCache, CommsManager.HttpServer, m_regInfo.ExternalHostName, CommsManager.HttpServer.Port,
capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName);
cap.RegisterHandlers(); cap.RegisterHandlers();
EventManager.TriggerOnRegisterCaps(agentId, cap); EventManager.TriggerOnRegisterCaps(agentId, cap);

View File

@ -60,11 +60,10 @@ namespace OpenSim.Region.Environment.Scenes.Tests
AssetCache ac = new AssetCache(assetService); AssetCache ac = new AssetCache(assetService);
StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", ""); StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", "");
BaseHttpServer httpServer = new BaseHttpServer(666);
IConfigSource configSource = new IniConfigSource(); IConfigSource configSource = new IniConfigSource();
TestScene testScene = new TestScene( TestScene testScene = new TestScene(
regInfo, acm, cm, scs, ac, sm, httpServer, null, false, false, false, configSource, null); regInfo, acm, cm, scs, ac, sm, null, false, false, false, configSource, null);
testScene.LandChannel = new TestLandChannel(); testScene.LandChannel = new TestLandChannel();
testScene.LoadWorldMap(); testScene.LoadWorldMap();

View File

@ -53,7 +53,7 @@ namespace OpenSim.Tests.Common.Mock
} }
public TestCommunicationsManager(NetworkServersInfo serversInfo) public TestCommunicationsManager(NetworkServersInfo serversInfo)
: base(serversInfo, null, null, false, null) : base(serversInfo, new BaseHttpServer(666), null, false, null)
{ {
m_userDataPlugin = new TestUserDataPlugin(); m_userDataPlugin = new TestUserDataPlugin();
m_inventoryDataPlugin = new TestInventoryDataPlugin(); m_inventoryDataPlugin = new TestInventoryDataPlugin();

View File

@ -40,10 +40,10 @@ namespace OpenSim.Tests.Common.Mock
public TestScene( public TestScene(
RegionInfo regInfo, AgentCircuitManager authen, RegionInfo regInfo, AgentCircuitManager authen,
CommunicationsManager commsMan, SceneCommunicationService sceneGridService, CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, AssetCache assetCach, StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
: base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, httpServer, moduleLoader, : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader,
dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion) dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
{ {
} }