From 585e575d23ebfd8c4657dbe63cd5b5d3b2b890fd Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 14 Sep 2010 22:47:45 +0100 Subject: Allow to place the connection strings and providers for estate and region in their oqn sections, for those of us who don't want a catch-all DatabaseService section. --- OpenSim/Services/Connectors/Simulation/EstateDataService.cs | 8 ++++++++ OpenSim/Services/Connectors/Simulation/SimulationDataService.cs | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs index 87c49d3..2eedebb 100644 --- a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs +++ b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs @@ -65,6 +65,14 @@ namespace OpenSim.Services.Connectors connString = dbConfig.GetString("ConnectionString", String.Empty); } + // Try reading the [EstateDataStore] section, if it exists + IConfig estConfig = config.Configs["EstateDataStore"]; + if (estConfig != null) + { + dllName = estConfig.GetString("StorageProvider", dllName); + connString = dbConfig.GetString("ConnectionString", connString); + } + // We tried, but this doesn't exist. We can't proceed if (dllName == String.Empty) throw new Exception("No StorageProvider configured"); diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs index 946f7e4..c8ecb18 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs @@ -63,6 +63,14 @@ namespace OpenSim.Services.Connectors connString = dbConfig.GetString("ConnectionString", String.Empty); } + // Try reading the [SimulationDataStore] section + IConfig simConfig = config.Configs["SimulationDataStore"]; + if (simConfig != null) + { + dllName = simConfig.GetString("StorageProvider", dllName); + connString = simConfig.GetString("ConnectionString", connString); + } + // We tried, but this doesn't exist. We can't proceed if (dllName == String.Empty) throw new Exception("No StorageProvider configured"); -- cgit v1.1