mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
Introduce a separate connection string for estates, which defaults to the one gi
ven for the region datastore. Removes the flag to store prim inventories, which are now always stored.
This commit is contained in:
@@ -300,9 +300,8 @@ namespace OpenSim
|
||||
}
|
||||
m_storageConnectionString
|
||||
= startupConfig.GetString("storage_connection_string", "URI=file:OpenSim.db,version=3");
|
||||
m_storagePersistPrimInventories
|
||||
= startupConfig.GetBoolean("storage_prim_inventories", true);
|
||||
|
||||
m_estateConnectionString
|
||||
= startupConfig.GetString("estate_connection_string", m_storageConnectionString);
|
||||
m_scriptEngine = startupConfig.GetString("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll");
|
||||
m_assetStorage = startupConfig.GetString("asset_database", "local");
|
||||
m_clientstackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
|
||||
@@ -555,9 +554,9 @@ namespace OpenSim
|
||||
return clientServer;
|
||||
}
|
||||
|
||||
protected override StorageManager CreateStorageManager(string connectionstring)
|
||||
protected override StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring)
|
||||
{
|
||||
return new StorageManager(m_storageDll, connectionstring, m_storagePersistPrimInventories);
|
||||
return new StorageManager(m_storageDll, connectionstring, estateconnectionstring);
|
||||
}
|
||||
|
||||
protected override ClientStackManager CreateClientStackManager()
|
||||
|
||||
@@ -62,13 +62,10 @@ namespace OpenSim.Region.ClientStack
|
||||
|
||||
protected StorageManager m_storageManager;
|
||||
protected string m_storageConnectionString;
|
||||
protected string m_estateConnectionString;
|
||||
|
||||
protected ClientStackManager m_clientStackManager;
|
||||
|
||||
// An attribute to indicate whether prim inventories should be persisted.
|
||||
// Probably will be temporary until this stops being experimental.
|
||||
protected bool m_storagePersistPrimInventories;
|
||||
|
||||
public SceneManager SceneManager
|
||||
{
|
||||
get { return m_sceneManager; }
|
||||
@@ -78,7 +75,7 @@ namespace OpenSim.Region.ClientStack
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
m_storageManager = CreateStorageManager(m_storageConnectionString);
|
||||
m_storageManager = CreateStorageManager(m_storageConnectionString, m_estateConnectionString);
|
||||
|
||||
m_clientStackManager = CreateClientStackManager();
|
||||
|
||||
@@ -101,7 +98,7 @@ namespace OpenSim.Region.ClientStack
|
||||
|
||||
// protected abstract ConsoleBase CreateConsole();
|
||||
protected abstract PhysicsScene GetPhysicsScene();
|
||||
protected abstract StorageManager CreateStorageManager(string connectionstring);
|
||||
protected abstract StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring);
|
||||
protected abstract ClientStackManager CreateClientStackManager();
|
||||
|
||||
protected PhysicsScene GetPhysicsScene(string engine, string meshEngine, IConfigSource config)
|
||||
|
||||
@@ -39,8 +39,7 @@ namespace OpenSim.Region.Environment.Interfaces
|
||||
/// </summary>
|
||||
/// <param name="filename">The file to save the database to (may not be applicable). Alternatively,
|
||||
/// a connection string for the database</param>
|
||||
/// <param name="persistPrimInventories">Temporary switch while this option is immature</param>
|
||||
void Initialise(string filename, bool persistPrimInventories);
|
||||
void Initialise(string filename);
|
||||
|
||||
/// <summary>
|
||||
/// Stores all object's details apart from inventory
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Environment
|
||||
m_dataStore = storage;
|
||||
}
|
||||
|
||||
public StorageManager(string dllName, string connectionstring, bool persistPrimInventories)
|
||||
public StorageManager(string dllName, string connectionstring, string estateconnectionstring)
|
||||
{
|
||||
m_log.Info("[DATASTORE]: Attempting to load " + dllName);
|
||||
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
||||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Environment
|
||||
{
|
||||
IRegionDataStore plug =
|
||||
(IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||
plug.Initialise(connectionstring, persistPrimInventories);
|
||||
plug.Initialise(connectionstring);
|
||||
|
||||
m_dataStore = plug;
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Environment
|
||||
{
|
||||
IEstateDataStore estPlug =
|
||||
(IEstateDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||
estPlug.Initialise(connectionstring);
|
||||
estPlug.Initialise(estateconnectionstring);
|
||||
|
||||
m_estateDataStore = estPlug;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user