diff options
author | Melanie | 2012-03-27 18:11:05 +0100 |
---|---|---|
committer | Melanie | 2012-03-27 18:11:05 +0100 |
commit | 6b5f3b49e783be3012f84d25bd986927c5a3e3e7 (patch) | |
tree | 35187e0f7c0bb0ca7b712e02b56c91ae5ecfd3ee /OpenSim/Services/AssetService | |
parent | Replace HG linker with core version (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-6b5f3b49e783be3012f84d25bd986927c5a3e3e7.zip opensim-SC_OLD-6b5f3b49e783be3012f84d25bd986927c5a3e3e7.tar.gz opensim-SC_OLD-6b5f3b49e783be3012f84d25bd986927c5a3e3e7.tar.bz2 opensim-SC_OLD-6b5f3b49e783be3012f84d25bd986927c5a3e3e7.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Services/AssetService')
-rw-r--r-- | OpenSim/Services/AssetService/AssetService.cs | 11 | ||||
-rw-r--r-- | OpenSim/Services/AssetService/AssetServiceBase.cs | 15 |
2 files changed, 20 insertions, 6 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index d4bfe8f..1427e84 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs | |||
@@ -46,7 +46,12 @@ namespace OpenSim.Services.AssetService | |||
46 | 46 | ||
47 | protected static AssetService m_RootInstance; | 47 | protected static AssetService m_RootInstance; |
48 | 48 | ||
49 | public AssetService(IConfigSource config) : base(config) | 49 | public AssetService(IConfigSource config) |
50 | : this(config, "AssetService") | ||
51 | { | ||
52 | } | ||
53 | |||
54 | public AssetService(IConfigSource config, string configName) : base(config, configName) | ||
50 | { | 55 | { |
51 | if (m_RootInstance == null) | 56 | if (m_RootInstance == null) |
52 | { | 57 | { |
@@ -54,9 +59,9 @@ namespace OpenSim.Services.AssetService | |||
54 | 59 | ||
55 | if (m_AssetLoader != null) | 60 | if (m_AssetLoader != null) |
56 | { | 61 | { |
57 | IConfig assetConfig = config.Configs["AssetService"]; | 62 | IConfig assetConfig = config.Configs[m_ConfigName]; |
58 | if (assetConfig == null) | 63 | if (assetConfig == null) |
59 | throw new Exception("No AssetService configuration"); | 64 | throw new Exception("No " + m_ConfigName + " configuration"); |
60 | 65 | ||
61 | string loaderArgs = assetConfig.GetString("AssetLoaderArgs", | 66 | string loaderArgs = assetConfig.GetString("AssetLoaderArgs", |
62 | String.Empty); | 67 | String.Empty); |
diff --git a/OpenSim/Services/AssetService/AssetServiceBase.cs b/OpenSim/Services/AssetService/AssetServiceBase.cs index 86752f9..177c565 100644 --- a/OpenSim/Services/AssetService/AssetServiceBase.cs +++ b/OpenSim/Services/AssetService/AssetServiceBase.cs | |||
@@ -39,16 +39,25 @@ namespace OpenSim.Services.AssetService | |||
39 | { | 39 | { |
40 | protected IAssetDataPlugin m_Database = null; | 40 | protected IAssetDataPlugin m_Database = null; |
41 | protected IAssetLoader m_AssetLoader = null; | 41 | protected IAssetLoader m_AssetLoader = null; |
42 | protected string m_ConfigName = "AssetService"; | ||
42 | 43 | ||
43 | public AssetServiceBase(IConfigSource config) : base(config) | 44 | public AssetServiceBase(IConfigSource config) |
45 | : this(config, "AssetService") | ||
44 | { | 46 | { |
47 | } | ||
48 | |||
49 | public AssetServiceBase(IConfigSource config, string configName) : base(config) | ||
50 | { | ||
51 | if (configName != string.Empty) | ||
52 | m_ConfigName = configName; | ||
53 | |||
45 | string dllName = String.Empty; | 54 | string dllName = String.Empty; |
46 | string connString = String.Empty; | 55 | string connString = String.Empty; |
47 | 56 | ||
48 | // | 57 | // |
49 | // Try reading the [AssetService] section first, if it exists | 58 | // Try reading the [AssetService] section, if it exists |
50 | // | 59 | // |
51 | IConfig assetConfig = config.Configs["AssetService"]; | 60 | IConfig assetConfig = config.Configs[m_ConfigName]; |
52 | if (assetConfig != null) | 61 | if (assetConfig != null) |
53 | { | 62 | { |
54 | dllName = assetConfig.GetString("StorageProvider", dllName); | 63 | dllName = assetConfig.GetString("StorageProvider", dllName); |