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 +++++++++++++-- bin/OpenSim.ini | 4 ++++ 2 files changed, 17 insertions(+), 2 deletions(-) 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); diff --git a/bin/OpenSim.ini b/bin/OpenSim.ini index f65523c..e6e1fe3 100644 --- a/bin/OpenSim.ini +++ b/bin/OpenSim.ini @@ -9,6 +9,10 @@ storage_plugin = "OpenSim.DataStore.MonoSqlite.dll" startup_console_commands_file = "startup_commands.txt" serverside_object_permissions = false +asset_database = "db4o" +;to try sqlite as the asset database , comment out the above line, and uncomment following one +; asset_database = "sqlite" + [StandAlone] accounts_authenticate = true -- cgit v1.1