aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetServer/Main.cs
diff options
context:
space:
mode:
authorSean Dague2008-04-23 20:57:18 +0000
committerSean Dague2008-04-23 20:57:18 +0000
commit3f95804911d1a1bc4b50518c047f073120306d72 (patch)
tree7e9b5e5ef5537676783c40a407e9d6c670b0b490 /OpenSim/Grid/AssetServer/Main.cs
parentallow for Inventory database source to be specified in main (diff)
downloadopensim-SC_OLD-3f95804911d1a1bc4b50518c047f073120306d72.zip
opensim-SC_OLD-3f95804911d1a1bc4b50518c047f073120306d72.tar.gz
opensim-SC_OLD-3f95804911d1a1bc4b50518c047f073120306d72.tar.bz2
opensim-SC_OLD-3f95804911d1a1bc4b50518c047f073120306d72.tar.xz
add a database_connect field for the asset server config
which will let you specify a connection string. Required for Nhibernate, optional for sqlite (there is a sane default), ignored for mysql and mssql until someone implements the Iniatialise(string) method.
Diffstat (limited to 'OpenSim/Grid/AssetServer/Main.cs')
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index 5a013b9..26f4bc8 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -116,7 +116,7 @@ namespace OpenSim.Grid.AssetServer
116 return null; 116 return null;
117 } 117 }
118 118
119 public IAssetProvider LoadDatabasePlugin(string FileName) 119 public IAssetProvider LoadDatabasePlugin(string FileName, string connect)
120 { 120 {
121 m_log.Info("[ASSET SERVER]: LoadDatabasePlugin: Attempting to load " + FileName); 121 m_log.Info("[ASSET SERVER]: LoadDatabasePlugin: Attempting to load " + FileName);
122 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 122 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
@@ -132,7 +132,7 @@ namespace OpenSim.Grid.AssetServer
132 IAssetProvider plug = 132 IAssetProvider plug =
133 (IAssetProvider) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 133 (IAssetProvider) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
134 assetPlugin = plug; 134 assetPlugin = plug;
135 assetPlugin.Initialise(); 135 assetPlugin.Initialise(connect);
136 136
137 m_log.Info("[ASSET SERVER]: Added " + assetPlugin.Name + " " + assetPlugin.Version); 137 m_log.Info("[ASSET SERVER]: Added " + assetPlugin.Name + " " + assetPlugin.Version);
138 break; 138 break;
@@ -150,7 +150,7 @@ namespace OpenSim.Grid.AssetServer
150 { 150 {
151 try 151 try
152 { 152 {
153 m_assetProvider = LoadDatabasePlugin(config.DatabaseProvider); 153 m_assetProvider = LoadDatabasePlugin(config.DatabaseProvider, config.DatabaseConnect);
154 if (m_assetProvider == null) 154 if (m_assetProvider == null)
155 { 155 {
156 m_log.Error("[ASSET]: Failed to load a database plugin, server halting"); 156 m_log.Error("[ASSET]: Failed to load a database plugin, server halting");