From 4f072a0876223a63b296c31b2102d6a2fd537fcc Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 26 Feb 2009 22:03:53 +0000 Subject: Changed CreateCommsManagerPlugin so it handles external subclasses of OpenSimBase. This process of checking if it should be creating HG or normal CommunicationsManager needs to change. So look out for a revert of this whole plugin soon. --- .../CreateCommsManager/CreateCommsManagerPlugin.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'OpenSim/ApplicationPlugins') diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs index a5a4470..d99de7a 100644 --- a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs +++ b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs @@ -64,6 +64,7 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager protected OpenSimBase m_openSim; protected BaseHttpServer m_httpServer; + protected CommunicationsManager m_commsManager; protected GridInfoService m_gridInfoService; protected IHyperlink HGServices = null; @@ -114,34 +115,34 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager { LibraryRootFolder libraryRootFolder = new LibraryRootFolder(m_openSim.ConfigurationSettings.LibrariesXMLFile); - if ((openSim is OpenSim) || (openSim is OpenSimBackground)) + if (openSim is HGOpenSimNode) { + HGOpenSimNode hgNode = (HGOpenSimNode)openSim; + // Standalone mode is determined by !startupConfig.GetBoolean("gridmode", false) if (m_openSim.ConfigurationSettings.Standalone) { - InitialiseStandaloneServices(libraryRootFolder); + InitialiseHGStandaloneServices(libraryRootFolder); } else { // We are in grid mode - InitialiseGridServices(libraryRootFolder); + InitialiseHGGridServices(libraryRootFolder); } + hgNode.HGServices = HGServices; } - else if (openSim is HGOpenSimNode) + else { - HGOpenSimNode hgNode = (HGOpenSimNode)openSim; - // Standalone mode is determined by !startupConfig.GetBoolean("gridmode", false) if (m_openSim.ConfigurationSettings.Standalone) { - InitialiseHGStandaloneServices(libraryRootFolder); + InitialiseStandaloneServices(libraryRootFolder); } else { // We are in grid mode - InitialiseHGGridServices(libraryRootFolder); + InitialiseGridServices(libraryRootFolder); } - hgNode.HGServices = HGServices; } openSim.CommunicationsManager = m_commsManager; -- cgit v1.1