changes to allow asset_source to be specified in the opensim.ini

this will work for sqlite and nhibernate, but will be ignored for
mysql and mssql (reverting to their ini files) until someone writes
that bit.
This commit is contained in:
Sean Dague
2008-04-23 19:13:06 +00:00
parent d194f21a5d
commit a1cc0e436f
9 changed files with 40 additions and 13 deletions

View File

@@ -35,9 +35,9 @@ namespace OpenSim.Framework.Communications.Cache
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public SQLAssetServer(string pluginName)
public SQLAssetServer(string pluginName, string connect)
{
AddPlugin(pluginName);
AddPlugin(pluginName, connect);
}
public SQLAssetServer(IAssetProvider assetProvider)
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications.Cache
m_assetProvider = assetProvider;
}
public void AddPlugin(string FileName)
public void AddPlugin(string FileName, string connect)
{
m_log.Info("[SQLAssetServer]: AssetStorage: Attempting to load " + FileName);
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
@@ -61,7 +61,7 @@ namespace OpenSim.Framework.Communications.Cache
IAssetProvider plug =
(IAssetProvider) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
m_assetProvider = plug;
m_assetProvider.Initialise();
m_assetProvider.Initialise(connect);
m_log.Info("[AssetStorage]: " +
"Added " + m_assetProvider.Name + " " +

View File

@@ -36,5 +36,6 @@ namespace OpenSim.Framework
void UpdateAsset(AssetBase asset);
bool ExistsAsset(LLUUID uuid);
void CommitAssets(); // force a sync to the database
void Initialise(string connect);
}
}