diff options
author | Mike Mazur | 2009-02-23 04:39:08 +0000 |
---|---|---|
committer | Mike Mazur | 2009-02-23 04:39:08 +0000 |
commit | dba8c90611abf50b706bc3ba54bc455ee142dae3 (patch) | |
tree | 052878bcc0cd4a23af2e0ad60f8b37f248bc5c2d /OpenSim/Grid/AssetInventoryServer | |
parent | Prevent avatar from walking along z-axis (diff) | |
download | opensim-SC_OLD-dba8c90611abf50b706bc3ba54bc455ee142dae3.zip opensim-SC_OLD-dba8c90611abf50b706bc3ba54bc455ee142dae3.tar.gz opensim-SC_OLD-dba8c90611abf50b706bc3ba54bc455ee142dae3.tar.bz2 opensim-SC_OLD-dba8c90611abf50b706bc3ba54bc455ee142dae3.tar.xz |
Load default assets when AssetInventory starts.
Diffstat (limited to 'OpenSim/Grid/AssetInventoryServer')
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/AssetInventoryConfig.cs | 1 | ||||
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs | 14 |
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; | |||
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Framework.Servers; | 32 | using OpenSim.Framework.Servers; |
33 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
34 | using OpenSim.Framework.AssetLoader.Filesystem; | ||
34 | using Nini.Config; | 35 | using Nini.Config; |
35 | using log4net; | 36 | using 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 | } |