aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/GridServer
diff options
context:
space:
mode:
authorMike Mazur2009-02-03 05:20:44 +0000
committerMike Mazur2009-02-03 05:20:44 +0000
commitd259238c748aafe366fd1d04e0248ef23116fd28 (patch)
treeec85d8863cffedda47d396d007459b5499bd8162 /OpenSim/Grid/GridServer
parent- move OpenSim/Framework/IUserData.cs to OpenSim/Data/IUserData.cs (diff)
downloadopensim-SC-d259238c748aafe366fd1d04e0248ef23116fd28.zip
opensim-SC-d259238c748aafe366fd1d04e0248ef23116fd28.tar.gz
opensim-SC-d259238c748aafe366fd1d04e0248ef23116fd28.tar.bz2
opensim-SC-d259238c748aafe366fd1d04e0248ef23116fd28.tar.xz
- 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
Diffstat (limited to 'OpenSim/Grid/GridServer')
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs43
1 files changed, 18 insertions, 25 deletions
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
53 private List<MessageServerInfo> _MessageServers = new List<MessageServerInfo>(); 53 private List<MessageServerInfo> _MessageServers = new List<MessageServerInfo>();
54 54
55 public GridConfig Config; 55 public GridConfig Config;
56 56
57 /// <value> 57 /// <value>
58 /// Used to notify old regions as to which OpenSim version to upgrade to 58 /// Used to notify old regions as to which OpenSim version to upgrade to
59 /// </value> 59 /// </value>
60 private string m_opensimVersion; 60 private string m_opensimVersion;
61 61
62 /// <summary> 62 /// <summary>
63 /// Constructor 63 /// Constructor
64 /// </summary> 64 /// </summary>
@@ -71,27 +71,20 @@ namespace OpenSim.Grid.GridServer
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// Adds a new grid server plugin - grid servers will be requested in the order they were loaded. 74 /// Adds a list of grid and log data plugins, as described by
75 /// `provider' and `connect', to `_plugins' and `_logplugins',
76 /// respectively.
75 /// </summary> 77 /// </summary>
76 /// <param name="provider">The name of the grid server plugin DLL</param> 78 /// <param name="provider">
79 /// The filename of the inventory server plugin DLL.
80 /// </param>
81 /// <param name="connect">
82 /// The connection string for the storage backend.
83 /// </param>
77 public void AddPlugin(string provider, string connect) 84 public void AddPlugin(string provider, string connect)
78 { 85 {
79 PluginLoader<IGridDataPlugin> gridloader = 86 _plugins = DataPluginFactory.LoadGridDataPlugins(provider, connect);
80 new PluginLoader<IGridDataPlugin> (new GridDataInitialiser (connect)); 87 _logplugins = DataPluginFactory.LoadLogDataPlugins(provider, connect);
81
82 PluginLoader<ILogDataPlugin> logloader =
83 new PluginLoader<ILogDataPlugin> (new LogDataInitialiser (connect));
84
85 // loader will try to load all providers (MySQL, MSSQL, etc)
86 // unless it is constrainted to the correct "Provider" entry in the addin.xml
87 gridloader.Add ("/OpenSim/GridData", new PluginProviderFilter (provider));
88 logloader.Add ("/OpenSim/LogData", new PluginProviderFilter (provider));
89
90 gridloader.Load();
91 logloader.Load();
92
93 _plugins = gridloader.Plugins;
94 _logplugins = logloader.Plugins;
95 } 88 }
96 89
97 /// <summary> 90 /// <summary>
@@ -389,8 +382,8 @@ namespace OpenSim.Grid.GridServer
389 m_log.Debug("[LOGIN PRELUDE]: Invalid login parameters, sending back error response."); 382 m_log.Debug("[LOGIN PRELUDE]: Invalid login parameters, sending back error response.");
390 return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString()); 383 return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString());
391 } 384 }
392 385
393 m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); 386 m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName);
394 387
395 if (!Config.AllowRegionRegistration) 388 if (!Config.AllowRegionRegistration)
396 { 389 {
@@ -399,12 +392,12 @@ namespace OpenSim.Grid.GridServer
399 sim.regionName); 392 sim.regionName);
400 393
401 return ErrorResponse("This grid is currently not accepting region registrations."); 394 return ErrorResponse("This grid is currently not accepting region registrations.");
402 } 395 }
403 396
404 int majorInterfaceVersion = 0; 397 int majorInterfaceVersion = 0;
405 if (requestData.ContainsKey("major_interface_version")) 398 if (requestData.ContainsKey("major_interface_version"))
406 int.TryParse((string)requestData["major_interface_version"], out majorInterfaceVersion); 399 int.TryParse((string)requestData["major_interface_version"], out majorInterfaceVersion);
407 400
408 if (majorInterfaceVersion != VersionInfo.MajorInterfaceVersion) 401 if (majorInterfaceVersion != VersionInfo.MajorInterfaceVersion)
409 { 402 {
410 return ErrorResponse( 403 return ErrorResponse(