From d259238c748aafe366fd1d04e0248ef23116fd28 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Tue, 3 Feb 2009 05:20:44 +0000 Subject: - moved data plugin loading code from various places to OpenSim/Data/DataPluginFactory.cs - removed dependencies on a few executable assemblies in bin/OpenSim.Data.addin.xml - trim trailing whitespace --- OpenSim/Grid/GridServer/GridManager.cs | 43 ++++++++++++++-------------------- 1 file changed, 18 insertions(+), 25 deletions(-) (limited to 'OpenSim/Grid/GridServer/GridManager.cs') diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index daee729..3fc0393 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs @@ -53,12 +53,12 @@ namespace OpenSim.Grid.GridServer private List _MessageServers = new List(); public GridConfig Config; - + /// /// Used to notify old regions as to which OpenSim version to upgrade to /// private string m_opensimVersion; - + /// /// Constructor /// @@ -71,27 +71,20 @@ namespace OpenSim.Grid.GridServer } /// - /// Adds a new grid server plugin - grid servers will be requested in the order they were loaded. + /// Adds a list of grid and log data plugins, as described by + /// `provider' and `connect', to `_plugins' and `_logplugins', + /// respectively. /// - /// The name of the grid server plugin DLL + /// + /// The filename of the inventory server plugin DLL. + /// + /// + /// The connection string for the storage backend. + /// public void AddPlugin(string provider, string connect) { - PluginLoader gridloader = - new PluginLoader (new GridDataInitialiser (connect)); - - PluginLoader logloader = - new PluginLoader (new LogDataInitialiser (connect)); - - // loader will try to load all providers (MySQL, MSSQL, etc) - // unless it is constrainted to the correct "Provider" entry in the addin.xml - gridloader.Add ("/OpenSim/GridData", new PluginProviderFilter (provider)); - logloader.Add ("/OpenSim/LogData", new PluginProviderFilter (provider)); - - gridloader.Load(); - logloader.Load(); - - _plugins = gridloader.Plugins; - _logplugins = logloader.Plugins; + _plugins = DataPluginFactory.LoadGridDataPlugins(provider, connect); + _logplugins = DataPluginFactory.LoadLogDataPlugins(provider, connect); } /// @@ -389,8 +382,8 @@ namespace OpenSim.Grid.GridServer m_log.Debug("[LOGIN PRELUDE]: Invalid login parameters, sending back error response."); return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString()); } - - m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); + + m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); if (!Config.AllowRegionRegistration) { @@ -399,12 +392,12 @@ namespace OpenSim.Grid.GridServer sim.regionName); return ErrorResponse("This grid is currently not accepting region registrations."); - } - + } + int majorInterfaceVersion = 0; if (requestData.ContainsKey("major_interface_version")) int.TryParse((string)requestData["major_interface_version"], out majorInterfaceVersion); - + if (majorInterfaceVersion != VersionInfo.MajorInterfaceVersion) { return ErrorResponse( -- cgit v1.1