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

---
 OpenSim/Region/Application/HGOpenSimNode.cs                  |  9 +++++----
 OpenSim/Region/Application/OpenSimBase.cs                    | 10 +++++-----
 .../Region/Environment/Scenes/Hypergrid/HGScene.Inventory.cs |  4 ++--
 OpenSim/Region/Environment/Scenes/Scene.cs                   | 12 ++++++------
 OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs    |  3 +--
 5 files changed, 19 insertions(+), 19 deletions(-)

(limited to 'OpenSim/Region')

diff --git a/OpenSim/Region/Application/HGOpenSimNode.cs b/OpenSim/Region/Application/HGOpenSimNode.cs
index 4f355cf..6c2db82 100644
--- a/OpenSim/Region/Application/HGOpenSimNode.cs
+++ b/OpenSim/Region/Application/HGOpenSimNode.cs
@@ -129,11 +129,12 @@ namespace OpenSim
                                      AgentCircuitManager circuitManager)
         {
             HGSceneCommunicationService sceneGridService = new HGSceneCommunicationService(m_commsManager, HGServices);
+            
             return
-                new HGScene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache,
-                          storageManager, m_httpServer,
-                          m_moduleLoader, m_configSettings.DumpAssetsToFile, m_configSettings.PhysicalPrim, m_configSettings.See_into_region_from_neighbor, m_config.Source,
-                          m_version);
+                new HGScene(
+                    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_version);
         }
 
         public override void RunCmd(string command, string[] cmdparams)
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 9031a8b..e3a81d1 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -467,11 +467,11 @@ namespace OpenSim
                                              AgentCircuitManager circuitManager)
         {
             SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager);
-            return
-                new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache,
-                          storageManager, m_httpServer,
-                          m_moduleLoader, m_configSettings.DumpAssetsToFile, m_configSettings.PhysicalPrim, m_configSettings.See_into_region_from_neighbor, m_config.Source,
-                          m_version);
+            
+            return new Scene(
+                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_version);
         }
 
         public void handleRestartRegion(RegionInfo whichRegion)
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
         /// </summary>
         protected Dictionary<UUID, Caps> m_capsHandlers = new Dictionary<UUID, Caps>();
 
-        protected BaseHttpServer m_httpListener;
-
         /// <value>
         /// All the region modules attached to this scene.
         /// </value>        
@@ -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