Re-added the ability to set the database provider (dll) in the config file for the userserver and gridserver.

afrisby
MW 2007-07-21 15:50:29 +00:00
parent 2c90c61020
commit b3cef2fc2a
4 changed files with 14 additions and 4 deletions

View File

@ -18,6 +18,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;

View File

@ -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;

View File

@ -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");

View File

@ -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);