aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs58
-rw-r--r--OpenSim/Region/Application/HGCommands.cs6
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs6
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs7
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs1
-rw-r--r--OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs5
-rw-r--r--OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs62
-rw-r--r--OpenSim/Tests/Common/Mock/TestScene.cs4
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs64
17 files changed, 52 insertions, 190 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
deleted file mode 100644
index 7c4ae9a..0000000
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using OpenMetaverse;
31using OpenSim.Framework.Communications.Cache;
32
33namespace OpenSim.Framework.Communications
34{
35 /// <summary>
36 /// This class manages references to OpenSim non-region services (inventory, user, etc.)
37 /// </summary>
38 ///
39 /// TODO: Service retrieval needs to be managed via plugin and interfaces requests, as happens for region
40 /// modules from scene. Among other things, this will allow this class to be used in many different contexts
41 /// (from a grid service executable, to provide services on a region) without lots of messy nulls and confusion.
42 /// Also, a post initialize step on the plugins will be needed so that we don't get tortuous problems with
43 /// circular dependencies between plugins.
44 public class CommunicationsManager
45 {
46 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47
48 /// <summary>
49 /// Constructor
50 /// </summary>
51 /// <param name="serversInfo"></param>
52 public CommunicationsManager(NetworkServersInfo serversInfo,
53 LibraryRootFolder libraryRootFolder)
54 {
55 }
56
57 }
58}
diff --git a/OpenSim/Region/Application/HGCommands.cs b/OpenSim/Region/Application/HGCommands.cs
index 7ae161d..a863697 100644
--- a/OpenSim/Region/Application/HGCommands.cs
+++ b/OpenSim/Region/Application/HGCommands.cs
@@ -44,14 +44,14 @@ namespace OpenSim
44 { 44 {
45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 public static Scene CreateScene(RegionInfo regionInfo, AgentCircuitManager circuitManager, CommunicationsManager m_commsManager, 47 public static Scene CreateScene(RegionInfo regionInfo, AgentCircuitManager circuitManager,
48 StorageManager storageManager, ModuleLoader m_moduleLoader, ConfigSettings m_configSettings, OpenSimConfigSource m_config, string m_version) 48 StorageManager storageManager, ModuleLoader m_moduleLoader, ConfigSettings m_configSettings, OpenSimConfigSource m_config, string m_version)
49 { 49 {
50 HGSceneCommunicationService sceneGridService = new HGSceneCommunicationService(m_commsManager); 50 HGSceneCommunicationService sceneGridService = new HGSceneCommunicationService();
51 51
52 return 52 return
53 new HGScene( 53 new HGScene(
54 regionInfo, circuitManager, m_commsManager, sceneGridService, storageManager, 54 regionInfo, circuitManager, sceneGridService, storageManager,
55 m_moduleLoader, false, m_configSettings.PhysicalPrim, 55 m_moduleLoader, false, m_configSettings.PhysicalPrim,
56 m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); 56 m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
57 } 57 }
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index d745fdc..7963785 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -607,13 +607,13 @@ namespace OpenSim
607 { 607 {
608 bool hgrid = ConfigSource.Source.Configs["Startup"].GetBoolean("hypergrid", false); 608 bool hgrid = ConfigSource.Source.Configs["Startup"].GetBoolean("hypergrid", false);
609 if (hgrid) 609 if (hgrid)
610 return HGCommands.CreateScene(regionInfo, circuitManager, m_commsManager, 610 return HGCommands.CreateScene(regionInfo, circuitManager,
611 storageManager, m_moduleLoader, m_configSettings, m_config, m_version); 611 storageManager, m_moduleLoader, m_configSettings, m_config, m_version);
612 612
613 SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); 613 SceneCommunicationService sceneGridService = new SceneCommunicationService();
614 614
615 return new Scene( 615 return new Scene(
616 regionInfo, circuitManager, m_commsManager, sceneGridService, 616 regionInfo, circuitManager, sceneGridService,
617 storageManager, m_moduleLoader, false, m_configSettings.PhysicalPrim, 617 storageManager, m_moduleLoader, false, m_configSettings.PhysicalPrim,
618 m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); 618 m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
619 } 619 }
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index fa6c9a8..0ec87e5 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -56,13 +56,6 @@ namespace OpenSim.Region.ClientStack
56 56
57 protected uint m_httpServerPort; 57 protected uint m_httpServerPort;
58 58
59 public CommunicationsManager CommunicationsManager
60 {
61 get { return m_commsManager; }
62 set { m_commsManager = value; }
63 }
64 protected CommunicationsManager m_commsManager;
65
66 protected StorageManager m_storageManager; 59 protected StorageManager m_storageManager;
67 60
68 protected ClientStackManager m_clientStackManager; 61 protected ClientStackManager m_clientStackManager;
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
index cc5b0e4..cf06e01 100644
--- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
@@ -157,7 +157,6 @@ namespace OpenSim.Region.CoreModules.Framework.Library
157 157
158 RegionInfo regInfo = new RegionInfo(); 158 RegionInfo regInfo = new RegionInfo();
159 Scene m_MockScene = new Scene(regInfo); 159 Scene m_MockScene = new Scene(regInfo);
160 m_MockScene.CommsManager = m_Scene.CommsManager;
161 LocalInventoryService invService = new LocalInventoryService(lib); 160 LocalInventoryService invService = new LocalInventoryService(lib);
162 m_MockScene.RegisterModuleInterface<IInventoryService>(invService); 161 m_MockScene.RegisterModuleInterface<IInventoryService>(invService);
163 m_MockScene.RegisterModuleInterface<IAssetService>(m_Scene.AssetService); 162 m_MockScene.RegisterModuleInterface<IAssetService>(m_Scene.AssetService);
diff --git a/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs b/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs
index f9bc935..b7d3904 100644
--- a/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs
+++ b/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs
@@ -46,7 +46,6 @@ namespace OpenSim.Region.CoreModules.InterGrid
46 { 46 {
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 private readonly List<Scene> m_scenes = new List<Scene>(); 48 private readonly List<Scene> m_scenes = new List<Scene>();
49 private CommunicationsManager m_com;
50 private IConfigSource m_settings; 49 private IConfigSource m_settings;
51 50
52 #region Implementation of IRegionModuleBase 51 #region Implementation of IRegionModuleBase
@@ -88,7 +87,6 @@ namespace OpenSim.Region.CoreModules.InterGrid
88 { 87 {
89 if (m_settings.Configs["Startup"].GetBoolean("gridmode", false)) 88 if (m_settings.Configs["Startup"].GetBoolean("gridmode", false))
90 { 89 {
91 m_com = m_scenes[0].CommsManager;
92 MainServer.Instance.AddXmlRPCHandler("grid_message", GridWideMessage); 90 MainServer.Instance.AddXmlRPCHandler("grid_message", GridWideMessage);
93 } 91 }
94 } 92 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 81496d6..bd2d8cb 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -58,8 +58,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
58 protected LocalSimulationConnectorModule m_localBackend; 58 protected LocalSimulationConnectorModule m_localBackend;
59 protected SimulationServiceConnector m_remoteConnector; 59 protected SimulationServiceConnector m_remoteConnector;
60 60
61 protected CommunicationsManager m_commsManager;
62
63 protected IHyperlinkService m_hyperlinkService; 61 protected IHyperlinkService m_hyperlinkService;
64 62
65 protected bool m_safemode; 63 protected bool m_safemode;
@@ -150,7 +148,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
150 protected virtual void InitOnce(Scene scene) 148 protected virtual void InitOnce(Scene scene)
151 { 149 {
152 m_localBackend = new LocalSimulationConnectorModule(); 150 m_localBackend = new LocalSimulationConnectorModule();
153 m_commsManager = scene.CommsManager;
154 m_aScene = scene; 151 m_aScene = scene;
155 //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); 152 //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService);
156 m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); 153 m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName);
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs
index 76d7a09..8e08912 100644
--- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs
@@ -64,11 +64,11 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
64 #region Constructors 64 #region Constructors
65 65
66 public HGScene(RegionInfo regInfo, AgentCircuitManager authen, 66 public HGScene(RegionInfo regInfo, AgentCircuitManager authen,
67 CommunicationsManager commsMan, SceneCommunicationService sceneGridService, 67 SceneCommunicationService sceneGridService,
68 StorageManager storeManager, 68 StorageManager storeManager,
69 ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, 69 ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
70 bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) 70 bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
71 : base(regInfo, authen, commsMan, sceneGridService, storeManager, moduleLoader, 71 : base(regInfo, authen, sceneGridService, storeManager, moduleLoader,
72 dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion) 72 dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
73 { 73 {
74 m_log.Info("[HGScene]: Starting HGScene."); 74 m_log.Info("[HGScene]: Starting HGScene.");
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
index 61419e6..a7a7c27 100644
--- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
58 } 58 }
59 } 59 }
60 60
61 public HGSceneCommunicationService(CommunicationsManager commsMan) : base(commsMan) 61 public HGSceneCommunicationService() : base()
62 { 62 {
63 } 63 }
64 64
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0493b4c..618e153 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -140,7 +140,6 @@ namespace OpenSim.Region.Framework.Scenes
140 protected ModuleLoader m_moduleLoader; 140 protected ModuleLoader m_moduleLoader;
141 protected StorageManager m_storageManager; 141 protected StorageManager m_storageManager;
142 protected AgentCircuitManager m_authenticateHandler; 142 protected AgentCircuitManager m_authenticateHandler;
143 public CommunicationsManager CommsManager;
144 143
145 protected SceneCommunicationService m_sceneGridService; 144 protected SceneCommunicationService m_sceneGridService;
146 public bool loginsdisabled = true; 145 public bool loginsdisabled = true;
@@ -547,7 +546,7 @@ namespace OpenSim.Region.Framework.Scenes
547 #region Constructors 546 #region Constructors
548 547
549 public Scene(RegionInfo regInfo, AgentCircuitManager authen, 548 public Scene(RegionInfo regInfo, AgentCircuitManager authen,
550 CommunicationsManager commsMan, SceneCommunicationService sceneGridService, 549 SceneCommunicationService sceneGridService,
551 StorageManager storeManager, 550 StorageManager storeManager,
552 ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, 551 ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
553 bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) 552 bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
@@ -583,7 +582,6 @@ namespace OpenSim.Region.Framework.Scenes
583 m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue/2))+(uint)(uint.MaxValue/4); 582 m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue/2))+(uint)(uint.MaxValue/4);
584 m_moduleLoader = moduleLoader; 583 m_moduleLoader = moduleLoader;
585 m_authenticateHandler = authen; 584 m_authenticateHandler = authen;
586 CommsManager = commsMan;
587 m_sceneGridService = sceneGridService; 585 m_sceneGridService = sceneGridService;
588 m_storageManager = storeManager; 586 m_storageManager = storeManager;
589 m_regInfo = regInfo; 587 m_regInfo = regInfo;
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 2e82748..269bd4a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -56,7 +56,6 @@ namespace OpenSim.Region.Framework.Scenes
56 { 56 {
57 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 57 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
58 58
59 protected CommunicationsManager m_commsProvider;
60 protected RegionInfo m_regionInfo; 59 protected RegionInfo m_regionInfo;
61 protected Scene m_scene; 60 protected Scene m_scene;
62 61
@@ -124,9 +123,8 @@ namespace OpenSim.Region.Framework.Scenes
124 123
125 public KiPrimitiveDelegate KiPrimitive; 124 public KiPrimitiveDelegate KiPrimitive;
126 125
127 public SceneCommunicationService(CommunicationsManager commsMan) 126 public SceneCommunicationService()
128 { 127 {
129 m_commsProvider = commsMan;
130 m_agentsInTransit = new List<UUID>(); 128 m_agentsInTransit = new List<UUID>();
131 } 129 }
132 130
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index 2365e16..501207e 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -58,7 +58,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
58 public UUID agent1, agent2, agent3; 58 public UUID agent1, agent2, agent3;
59 public static Random random; 59 public static Random random;
60 public ulong region1,region2,region3; 60 public ulong region1,region2,region3;
61 public TestCommunicationsManager cm;
62 public AgentCircuitData acd1; 61 public AgentCircuitData acd1;
63 public SceneObjectGroup sog1, sog2, sog3; 62 public SceneObjectGroup sog1, sog2, sog3;
64 public TestClient testclient; 63 public TestClient testclient;
@@ -66,10 +65,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
66 [TestFixtureSetUp] 65 [TestFixtureSetUp]
67 public void Init() 66 public void Init()
68 { 67 {
69 cm = new TestCommunicationsManager(); 68 scene = SceneSetupHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000);
70 scene = SceneSetupHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000, cm); 69 scene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000);
71 scene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000, cm); 70 scene3 = SceneSetupHelpers.SetupScene("Neighbour x-1", UUID.Random(), 999, 1000);
72 scene3 = SceneSetupHelpers.SetupScene("Neighbour x-1", UUID.Random(), 999, 1000, cm);
73 71
74 ISharedRegionModule interregionComms = new LocalSimulationConnectorModule(); 72 ISharedRegionModule interregionComms = new LocalSimulationConnectorModule();
75 interregionComms.Initialise(new IniConfigSource()); 73 interregionComms.Initialise(new IniConfigSource());
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
index 8a27b7b..c77220c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
@@ -132,7 +132,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
132 RegionInfo regionInfo = new RegionInfo(0,0,null,null); 132 RegionInfo regionInfo = new RegionInfo(0,0,null,null);
133 FakeStorageManager storageManager = new FakeStorageManager(); 133 FakeStorageManager storageManager = new FakeStorageManager();
134 134
135 new Scene(regionInfo, null, null, null, storageManager, null, false, false, false, null, null); 135 new Scene(regionInfo, null, null, storageManager, null, false, false, false, null, null);
136 } 136 }
137 } 137 }
138} 138}
diff --git a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs
index a030dc4..cafe48a 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs
@@ -113,17 +113,16 @@ namespace OpenSim.Region.Framework.Scenes.Tests
113 113
114 UUID sceneAId = UUID.Parse("00000000-0000-0000-0000-000000000100"); 114 UUID sceneAId = UUID.Parse("00000000-0000-0000-0000-000000000100");
115 UUID sceneBId = UUID.Parse("00000000-0000-0000-0000-000000000200"); 115 UUID sceneBId = UUID.Parse("00000000-0000-0000-0000-000000000200");
116 TestCommunicationsManager cm = new TestCommunicationsManager();
117 116
118 // shared module 117 // shared module
119 ISharedRegionModule interregionComms = new LocalSimulationConnectorModule(); 118 ISharedRegionModule interregionComms = new LocalSimulationConnectorModule();
120 119
121 120
122 Scene sceneB = SceneSetupHelpers.SetupScene("sceneB", sceneBId, 1010, 1010, cm, "grid"); 121 Scene sceneB = SceneSetupHelpers.SetupScene("sceneB", sceneBId, 1010, 1010, "grid");
123 SceneSetupHelpers.SetupSceneModules(sceneB, new IniConfigSource(), interregionComms); 122 SceneSetupHelpers.SetupSceneModules(sceneB, new IniConfigSource(), interregionComms);
124 sceneB.RegisterRegionWithGrid(); 123 sceneB.RegisterRegionWithGrid();
125 124
126 Scene sceneA = SceneSetupHelpers.SetupScene("sceneA", sceneAId, 1000, 1000, cm, "grid"); 125 Scene sceneA = SceneSetupHelpers.SetupScene("sceneA", sceneAId, 1000, 1000, "grid");
127 SceneSetupHelpers.SetupSceneModules(sceneA, new IniConfigSource(), interregionComms); 126 SceneSetupHelpers.SetupSceneModules(sceneA, new IniConfigSource(), interregionComms);
128 sceneA.RegisterRegionWithGrid(); 127 sceneA.RegisterRegionWithGrid();
129 128
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
deleted file mode 100644
index 8e193c1..0000000
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenSim.Framework;
29using OpenSim.Framework.Communications;
30using OpenSim.Framework.Communications.Cache;
31using OpenSim.Framework.Servers;
32using OpenSim.Framework.Servers.HttpServer;
33using OpenSim.Data;
34
35namespace OpenSim.Tests.Common.Mock
36{
37 public class TestCommunicationsManager : CommunicationsManager
38 {
39 public IUserDataPlugin UserDataPlugin
40 {
41 get { return m_userDataPlugin; }
42 }
43 private IUserDataPlugin m_userDataPlugin;
44
45 // public IInventoryDataPlugin InventoryDataPlugin
46 // {
47 // get { return m_inventoryDataPlugin; }
48 // }
49 // private IInventoryDataPlugin m_inventoryDataPlugin;
50
51 public TestCommunicationsManager()
52 : this(null)
53 {
54 }
55
56 public TestCommunicationsManager(NetworkServersInfo serversInfo)
57 : base(serversInfo, null)
58 {
59
60 }
61 }
62}
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 22cfa2c..bf3825b 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -40,10 +40,10 @@ namespace OpenSim.Tests.Common.Mock
40 { 40 {
41 public TestScene( 41 public TestScene(
42 RegionInfo regInfo, AgentCircuitManager authen, 42 RegionInfo regInfo, AgentCircuitManager authen,
43 CommunicationsManager commsMan, SceneCommunicationService sceneGridService, StorageManager storeManager, 43 SceneCommunicationService sceneGridService, StorageManager storeManager,
44 ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, 44 ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
45 bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) 45 bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
46 : base(regInfo, authen, commsMan, sceneGridService, storeManager, moduleLoader, 46 : base(regInfo, authen, sceneGridService, storeManager, moduleLoader,
47 dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion) 47 dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
48 { 48 {
49 } 49 }
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index dbb8fd4..f6c9f3b 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -60,7 +60,6 @@ namespace OpenSim.Tests.Common.Setup
60 private static ISharedRegionModule m_assetService = null; 60 private static ISharedRegionModule m_assetService = null;
61 private static ISharedRegionModule m_inventoryService = null; 61 private static ISharedRegionModule m_inventoryService = null;
62 private static ISharedRegionModule m_gridService = null; 62 private static ISharedRegionModule m_gridService = null;
63 private static TestCommunicationsManager commsManager = null;
64 63
65 /// <summary> 64 /// <summary>
66 /// Set up a test scene 65 /// Set up a test scene
@@ -83,21 +82,23 @@ namespace OpenSim.Tests.Common.Setup
83 public static TestScene SetupScene(String realServices) 82 public static TestScene SetupScene(String realServices)
84 { 83 {
85 return SetupScene( 84 return SetupScene(
86 "Unit test region", UUID.Random(), 1000, 1000, new TestCommunicationsManager(), realServices); 85 "Unit test region", UUID.Random(), 1000, 1000, realServices);
87 } 86 }
88 87
89 /// <summary> 88 // REFACTORING PROBLEM. No idea what the difference is with the previous one
90 /// Set up a test scene 89 ///// <summary>
91 /// </summary> 90 ///// Set up a test scene
92 /// 91 ///// </summary>
93 /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> 92 /////
94 /// <param name="cm">This should be the same if simulating two scenes within a standalone</param> 93 ///// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
95 /// <returns></returns> 94 ///// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
96 public static TestScene SetupScene(TestCommunicationsManager cm, String realServices) 95 ///// <returns></returns>
97 { 96 //public static TestScene SetupScene(String realServices)
98 return SetupScene( 97 //{
99 "Unit test region", UUID.Random(), 1000, 1000, cm, ""); 98 // return SetupScene(
100 } 99 // "Unit test region", UUID.Random(), 1000, 1000, "");
100 //}
101
101 /// <summary> 102 /// <summary>
102 /// Set up a test scene 103 /// Set up a test scene
103 /// </summary> 104 /// </summary>
@@ -107,9 +108,9 @@ namespace OpenSim.Tests.Common.Setup
107 /// <param name="y">Y co-ordinate of the region</param> 108 /// <param name="y">Y co-ordinate of the region</param>
108 /// <param name="cm">This should be the same if simulating two scenes within a standalone</param> 109 /// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
109 /// <returns></returns> 110 /// <returns></returns>
110 public static TestScene SetupScene(string name, UUID id, uint x, uint y, TestCommunicationsManager cm) 111 public static TestScene SetupScene(string name, UUID id, uint x, uint y)
111 { 112 {
112 return SetupScene(name, id, x, y, cm, ""); 113 return SetupScene(name, id, x, y,"");
113 } 114 }
114 115
115 116
@@ -125,23 +126,24 @@ namespace OpenSim.Tests.Common.Setup
125 /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> 126 /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
126 /// <returns></returns> 127 /// <returns></returns>
127 public static TestScene SetupScene( 128 public static TestScene SetupScene(
128 string name, UUID id, uint x, uint y, TestCommunicationsManager cm, String realServices) 129 string name, UUID id, uint x, uint y, String realServices)
129 { 130 {
130 bool newScene = false; 131 bool newScene = false;
131 132
132 Console.WriteLine("Setting up test scene {0}", name); 133 Console.WriteLine("Setting up test scene {0}", name);
133 134
134 // If cm is the same as our last commsManager used, this means the tester wants to link 135 // REFACTORING PROBLEM!
135 // regions. In this case, don't use the sameshared region modules and dont initialize them again. 136 //// If cm is the same as our last commsManager used, this means the tester wants to link
136 // Also, no need to start another MainServer and MainConsole instance. 137 //// regions. In this case, don't use the sameshared region modules and dont initialize them again.
137 if (cm == null || cm != commsManager) 138 //// Also, no need to start another MainServer and MainConsole instance.
138 { 139 //if (cm == null || cm != commsManager)
139 System.Console.WriteLine("Starting a brand new scene"); 140 //{
140 newScene = true; 141 // System.Console.WriteLine("Starting a brand new scene");
141 MainConsole.Instance = new LocalConsole("TEST PROMPT"); 142 // newScene = true;
142 MainServer.Instance = new BaseHttpServer(980); 143 // MainConsole.Instance = new LocalConsole("TEST PROMPT");
143 commsManager = cm; 144 // MainServer.Instance = new BaseHttpServer(980);
144 } 145 // commsManager = cm;
146 //}
145 147
146 // We must set up a console otherwise setup of some modules may fail 148 // We must set up a console otherwise setup of some modules may fail
147 RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); 149 RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1");
@@ -149,13 +151,13 @@ namespace OpenSim.Tests.Common.Setup
149 regInfo.RegionID = id; 151 regInfo.RegionID = id;
150 152
151 AgentCircuitManager acm = new AgentCircuitManager(); 153 AgentCircuitManager acm = new AgentCircuitManager();
152 SceneCommunicationService scs = new SceneCommunicationService(cm); 154 SceneCommunicationService scs = new SceneCommunicationService();
153 155
154 StorageManager sm = new StorageManager("OpenSim.Data.Null.dll", "", ""); 156 StorageManager sm = new StorageManager("OpenSim.Data.Null.dll", "", "");
155 IConfigSource configSource = new IniConfigSource(); 157 IConfigSource configSource = new IniConfigSource();
156 158
157 TestScene testScene = new TestScene( 159 TestScene testScene = new TestScene(
158 regInfo, acm, cm, scs, sm, null, false, false, false, configSource, null); 160 regInfo, acm, scs, sm, null, false, false, false, configSource, null);
159 161
160 INonSharedRegionModule capsModule = new CapabilitiesModule(); 162 INonSharedRegionModule capsModule = new CapabilitiesModule();
161 capsModule.Initialise(new IniConfigSource()); 163 capsModule.Initialise(new IniConfigSource());