From 6ce5b6e439e304ba8ce27a9e5bad3146feedd7f0 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 27 Apr 2007 21:11:02 +0000 Subject: Major ass commit Added new "Datastore" parameter to simconfig.xml which is passed to storage engines via a new Initialise() function. --- OpenSim.RegionServer/RegionInfo.cs | 13 +++++++++++++ OpenSim.RegionServer/world/World.cs | 4 ++++ 2 files changed, 17 insertions(+) (limited to 'OpenSim.RegionServer') diff --git a/OpenSim.RegionServer/RegionInfo.cs b/OpenSim.RegionServer/RegionInfo.cs index 2f8bfa1..a1923f5 100644 --- a/OpenSim.RegionServer/RegionInfo.cs +++ b/OpenSim.RegionServer/RegionInfo.cs @@ -36,6 +36,8 @@ namespace OpenSim public string UserRecvKey = ""; private bool isSandbox; + public string DataStore; + public RegionInfo() { @@ -144,6 +146,17 @@ namespace OpenSim { this.RegionLocY = (uint)Convert.ToUInt32(attri); } + + // Local storage datastore + attri = ""; + attri = configData.GetAttribute("Datastore"); + if (attri == "") + { + string datastore = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Filename for local storage", "localworld.yap"); + configData.SetAttribute("Datastore", datastore); + this.DataStore = datastore; + } + //Sim Listen Port attri = ""; attri = configData.GetAttribute("SimListenPort"); diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 0e5dbf0..5443d38 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs @@ -44,6 +44,8 @@ namespace OpenSim.world private AssetCache _assetCache; private Mutex updateLock; + public string m_datastore; + /// /// Creates a new World class, and a region to go with it. /// @@ -257,6 +259,8 @@ namespace OpenSim.world { ILocalStorage plug = (ILocalStorage)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); store = plug; + + store.Initialise(this.m_datastore); break; } -- cgit v1.1