From b3cef2fc2a02510c550843fe080ff2d77d2fb743 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 21 Jul 2007 15:50:29 +0000 Subject: Re-added the ability to set the database provider (dll) in the config file for the userserver and gridserver. --- OpenSim/Framework/General/Configuration/GridConfig.cs | 7 ++++++- OpenSim/Framework/General/Configuration/UserConfig.cs | 7 ++++++- OpenSim/Grid/GridServer/Main.cs | 2 +- OpenSim/Grid/UserServer/Main.cs | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/General/Configuration/GridConfig.cs b/OpenSim/Framework/General/Configuration/GridConfig.cs index 0a7f65c..3d07d9b 100644 --- a/OpenSim/Framework/General/Configuration/GridConfig.cs +++ b/OpenSim/Framework/General/Configuration/GridConfig.cs @@ -17,6 +17,8 @@ namespace OpenSim.Framework.Configuration public string SimSendKey = ""; public string SimRecvKey = ""; + + public string DatabaseProvider = ""; private ConfigurationMember configMember; public GridConfig(string description, string filename) @@ -38,7 +40,7 @@ namespace OpenSim.Framework.Configuration configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to a simulator", "null", false); configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from a simulator", "null", false); - + configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); } public bool handleIncomingConfiguration(string configuration_key, object configuration_result) @@ -72,6 +74,9 @@ namespace OpenSim.Framework.Configuration case "sim_recv_key": this.SimRecvKey = (string)configuration_result; break; + case "database_provider": + this.DatabaseProvider = (string)configuration_result; + break; } return true; diff --git a/OpenSim/Framework/General/Configuration/UserConfig.cs b/OpenSim/Framework/General/Configuration/UserConfig.cs index a027ffc..2183491 100644 --- a/OpenSim/Framework/General/Configuration/UserConfig.cs +++ b/OpenSim/Framework/General/Configuration/UserConfig.cs @@ -14,6 +14,8 @@ namespace OpenSim.Framework.Configuration public string GridSendKey = ""; public string GridRecvKey = ""; + public string DatabaseProvider = ""; + private ConfigurationMember configMember; public UserConfig(string description, string filename) @@ -29,7 +31,7 @@ namespace OpenSim.Framework.Configuration configMember.addConfigurationOption("default_grid_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:8001/", false); configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to grid server", "null", false); configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from grid server", "null", false); - + configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); } @@ -49,6 +51,9 @@ namespace OpenSim.Framework.Configuration case "grid_recv_key": this.GridRecvKey = (string)configuration_result; break; + case "database_provider": + this.DatabaseProvider = (string)configuration_result; + break; } return true; diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs index c72948d..8353066 100644 --- a/OpenSim/Grid/GridServer/Main.cs +++ b/OpenSim/Grid/GridServer/Main.cs @@ -110,7 +110,7 @@ namespace OpenSim.Grid.GridServer m_console.Verbose( "Main.cs:Startup() - Connecting to Storage Server"); m_gridManager = new GridManager(); - m_gridManager.AddPlugin(GridDll); // Made of win + m_gridManager.AddPlugin(Cfg.DatabaseProvider); // Made of win m_gridManager.config = Cfg; m_console.Verbose( "Main.cs:Startup() - Starting HTTP process"); diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 99401fc..a6571cf 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -86,7 +86,7 @@ namespace OpenSim.Grid.UserServer MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection"); m_userManager = new UserManager(); m_userManager._config = Cfg; - m_userManager.AddPlugin(StorageDll); + m_userManager.AddPlugin(Cfg.DatabaseProvider); MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process"); BaseHttpServer httpServer = new BaseHttpServer(8002); -- cgit v1.1