From 91cc820f34cef19e1bb9659faf2d6c7070dcda96 Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 10 Sep 2007 07:23:43 +0000 Subject: Added "asset_database =" option to opensim.ini, so the asset database can be selected. Currently set default back to db4o until more people test using sqlite. --- OpenSim/Region/Application/OpenSimMain.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Application/OpenSimMain.cs') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 8437933..ea2e2ff 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -88,6 +88,8 @@ namespace OpenSim private string standaloneInventoryPlugin = ""; private string standaloneUserPlugin = ""; + private string m_assetStorage = "sqlite"; + private Scene m_consoleRegion = null; public ConsoleCommand CreateAccount = null; @@ -127,6 +129,8 @@ namespace OpenSim m_scriptEngine = configSource.Configs["Startup"].GetString("script_engine", "DotNetEngine"); + m_assetStorage = configSource.Configs["Startup"].GetString("asset_database", "sqlite"); + m_DefaultModules = configSource.Configs["Startup"].GetBoolean("default_modules", true); m_DefaultSharedModules = configSource.Configs["Startup"].GetBoolean("default_shared_modules", true); m_exceptModules = configSource.Configs["Startup"].GetString("except_modules", ""); @@ -266,8 +270,15 @@ namespace OpenSim { m_httpServerPort = m_networkServersInfo.HttpListenerPort; - // LocalAssetServer assetServer = new LocalAssetServer(); - SQLAssetServer assetServer = new SQLAssetServer(); + IAssetServer assetServer; + if (m_assetStorage == "db4o") + { + assetServer = new LocalAssetServer(); + } + else + { + assetServer = new SQLAssetServer(); + } assetServer.SetServerInfo(m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); m_assetCache = new AssetCache(assetServer); // m_assetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); -- cgit v1.1