aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorSean Dague2008-04-23 19:13:06 +0000
committerSean Dague2008-04-23 19:13:06 +0000
commita1cc0e436ff9081f3c0a76de861ed0673cd36142 (patch)
tree31d775f3e17109b5b6765e89b73da9f036172328 /OpenSim/Framework
parent* Fix a console issue where pressing return on some operating systems cause t... (diff)
downloadopensim-SC_OLD-a1cc0e436ff9081f3c0a76de861ed0673cd36142.zip
opensim-SC_OLD-a1cc0e436ff9081f3c0a76de861ed0673cd36142.tar.gz
opensim-SC_OLD-a1cc0e436ff9081f3c0a76de861ed0673cd36142.tar.bz2
opensim-SC_OLD-a1cc0e436ff9081f3c0a76de861ed0673cd36142.tar.xz
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.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/Cache/SQLAssetServer.cs8
-rw-r--r--OpenSim/Framework/IAssetProvider.cs1
2 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
index 1afec70..334c5bd 100644
--- a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
+++ b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
@@ -35,9 +35,9 @@ namespace OpenSim.Framework.Communications.Cache
35 { 35 {
36 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 36 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
37 37
38 public SQLAssetServer(string pluginName) 38 public SQLAssetServer(string pluginName, string connect)
39 { 39 {
40 AddPlugin(pluginName); 40 AddPlugin(pluginName, connect);
41 } 41 }
42 42
43 public SQLAssetServer(IAssetProvider assetProvider) 43 public SQLAssetServer(IAssetProvider assetProvider)
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications.Cache
45 m_assetProvider = assetProvider; 45 m_assetProvider = assetProvider;
46 } 46 }
47 47
48 public void AddPlugin(string FileName) 48 public void AddPlugin(string FileName, string connect)
49 { 49 {
50 m_log.Info("[SQLAssetServer]: AssetStorage: Attempting to load " + FileName); 50 m_log.Info("[SQLAssetServer]: AssetStorage: Attempting to load " + FileName);
51 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 51 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
@@ -61,7 +61,7 @@ namespace OpenSim.Framework.Communications.Cache
61 IAssetProvider plug = 61 IAssetProvider plug =
62 (IAssetProvider) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 62 (IAssetProvider) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
63 m_assetProvider = plug; 63 m_assetProvider = plug;
64 m_assetProvider.Initialise(); 64 m_assetProvider.Initialise(connect);
65 65
66 m_log.Info("[AssetStorage]: " + 66 m_log.Info("[AssetStorage]: " +
67 "Added " + m_assetProvider.Name + " " + 67 "Added " + m_assetProvider.Name + " " +
diff --git a/OpenSim/Framework/IAssetProvider.cs b/OpenSim/Framework/IAssetProvider.cs
index c9e4c8a..dcb79ea 100644
--- a/OpenSim/Framework/IAssetProvider.cs
+++ b/OpenSim/Framework/IAssetProvider.cs
@@ -36,5 +36,6 @@ namespace OpenSim.Framework
36 void UpdateAsset(AssetBase asset); 36 void UpdateAsset(AssetBase asset);
37 bool ExistsAsset(LLUUID uuid); 37 bool ExistsAsset(LLUUID uuid);
38 void CommitAssets(); // force a sync to the database 38 void CommitAssets(); // force a sync to the database
39 void Initialise(string connect);
39 } 40 }
40} 41}