aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetInventoryServer
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/AssetInventoryServer')
-rw-r--r--OpenSim/Grid/AssetInventoryServer/AssetInventoryConfig.cs1
-rw-r--r--OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs14
2 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/AssetInventoryConfig.cs b/OpenSim/Grid/AssetInventoryServer/AssetInventoryConfig.cs
index d0f4250..79b6c73 100644
--- a/OpenSim/Grid/AssetInventoryServer/AssetInventoryConfig.cs
+++ b/OpenSim/Grid/AssetInventoryServer/AssetInventoryConfig.cs
@@ -71,6 +71,7 @@ namespace OpenSim.Grid.AssetInventoryServer
71 { 71 {
72 IConfig config = result.AddConfig("Config"); 72 IConfig config = result.AddConfig("Config");
73 config.Set("listen_port", 8003); 73 config.Set("listen_port", 8003);
74 config.Set("assetset_location", String.Format(".{0}assets{0}AssetSets.xml", Path.DirectorySeparatorChar));
74 } 75 }
75 76
76 { 77 {
diff --git a/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs b/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs
index 74e6ea4..2687af6 100644
--- a/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs
+++ b/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs
@@ -31,6 +31,7 @@ using System.Reflection;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Framework.Servers; 32using OpenSim.Framework.Servers;
33using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
34using OpenSim.Framework.AssetLoader.Filesystem;
34using Nini.Config; 35using Nini.Config;
35using log4net; 36using log4net;
36 37
@@ -96,6 +97,8 @@ namespace OpenSim.Grid.AssetInventoryServer
96 return false; 97 return false;
97 } 98 }
98 99
100 LoadDefaultAssets();
101
99 AuthenticationProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/AuthenticationProvider", 102 AuthenticationProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/AuthenticationProvider",
100 "authentication_provider", false) as IAuthenticationProvider; 103 "authentication_provider", false) as IAuthenticationProvider;
101 m_backends.Add(AuthenticationProvider); 104 m_backends.Add(AuthenticationProvider);
@@ -197,5 +200,16 @@ namespace OpenSim.Grid.AssetInventoryServer
197 200
198 return loader.Plugins; 201 return loader.Plugins;
199 } 202 }
203
204 private void LoadDefaultAssets()
205 {
206 AssetLoaderFileSystem assetLoader = new AssetLoaderFileSystem();
207 assetLoader.ForEachDefaultXmlAsset(ConfigFile.Configs["Config"].GetString("assetset_location"), StoreAsset);
208 }
209
210 private void StoreAsset(AssetBase asset)
211 {
212 StorageProvider.TryCreateAsset(asset);
213 }
200 } 214 }
201} 215}