From b6ee2f15bacda2a2c22785923b1e41639db5a6db Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 6 Jan 2009 15:09:52 +0000 Subject: * refactor: Remove the need to separately pass in the http listener to the scene - this is always available via CommsManager --- .../Region/Environment/Scenes/Hypergrid/HGScene.Inventory.cs | 4 ++-- OpenSim/Region/Environment/Scenes/Scene.cs | 12 ++++++------ OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs | 3 +-- 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.Inventory.cs index f44ba30..bdb90d8 100644 --- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.Inventory.cs @@ -58,10 +58,10 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid public HGScene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, - AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, + AssetCache assetCach, StorageManager storeManager, ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, 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) { m_log.Info("[HGScene]: Starting HGScene."); diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 480b750..18afb86 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -120,8 +120,6 @@ namespace OpenSim.Region.Environment.Scenes /// protected Dictionary m_capsHandlers = new Dictionary(); - protected BaseHttpServer m_httpListener; - /// /// All the region modules attached to this scene. /// @@ -300,7 +298,7 @@ namespace OpenSim.Region.Environment.Scenes public Scene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, - AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, + AssetCache assetCach, StorageManager storeManager, ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) { @@ -351,7 +349,6 @@ namespace OpenSim.Region.Environment.Scenes RegisterDefaultSceneEvents(); - m_httpListener = httpServer; m_dumpAssetsToFile = dumpAssetsToFile; m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts; @@ -2874,8 +2871,11 @@ namespace OpenSim.Region.Environment.Scenes return; } - cap = new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, - capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName); + cap + = new Caps( + AssetCache, CommsManager.HttpServer, m_regInfo.ExternalHostName, CommsManager.HttpServer.Port, + capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName); + cap.RegisterHandlers(); EventManager.TriggerOnRegisterCaps(agentId, cap); diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs index 5212f94..13ccce2 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs @@ -60,11 +60,10 @@ namespace OpenSim.Region.Environment.Scenes.Tests AssetCache ac = new AssetCache(assetService); StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", ""); - BaseHttpServer httpServer = new BaseHttpServer(666); IConfigSource configSource = new IniConfigSource(); 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.LoadWorldMap(); -- cgit v1.1