diff options
author | diva | 2009-06-10 13:18:32 +0000 |
---|---|---|
committer | diva | 2009-06-10 13:18:32 +0000 |
commit | 0f367bd7bbc5d22d4834e1eb0f1671381485143e (patch) | |
tree | eeb4290f1146601f8fd97dc164e0a7f247a2fafb /OpenSim/Services/AssetService | |
parent | From: Alan Webb <alan_webb@us.ibm.com> (diff) | |
download | opensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.zip opensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.tar.gz opensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.tar.bz2 opensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.tar.xz |
Heart surgery no.2: the inventory service hooks.
Several improvements in the connectors themselves.
Several improvements in configurations.
Needed to add a hack in IUserService and UserManagerBase, to be removed when that service is refactored.
Diffstat (limited to 'OpenSim/Services/AssetService')
-rw-r--r-- | OpenSim/Services/AssetService/AssetServiceBase.cs | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/OpenSim/Services/AssetService/AssetServiceBase.cs b/OpenSim/Services/AssetService/AssetServiceBase.cs index d5faffb..c42d469 100644 --- a/OpenSim/Services/AssetService/AssetServiceBase.cs +++ b/OpenSim/Services/AssetService/AssetServiceBase.cs | |||
@@ -42,18 +42,34 @@ namespace OpenSim.Services.AssetService | |||
42 | 42 | ||
43 | public AssetServiceBase(IConfigSource config) : base(config) | 43 | public AssetServiceBase(IConfigSource config) : base(config) |
44 | { | 44 | { |
45 | IConfig assetConfig = config.Configs["AssetService"]; | 45 | string dllName = String.Empty; |
46 | if (assetConfig == null) | 46 | string connString = String.Empty; |
47 | throw new Exception("No AssetService configuration"); | ||
48 | 47 | ||
49 | string dllName = assetConfig.GetString("StorageProvider", | 48 | // |
50 | String.Empty); | 49 | // Try reading the [DatabaseService] section first, if it exists |
50 | // | ||
51 | IConfig dbConfig = config.Configs["DatabaseService"]; | ||
52 | if (dbConfig != null) | ||
53 | { | ||
54 | dllName = dbConfig.GetString("StorageProvider", String.Empty); | ||
55 | connString = dbConfig.GetString("ConnectionString", String.Empty); | ||
56 | } | ||
51 | 57 | ||
52 | if (dllName == String.Empty) | 58 | // |
53 | throw new Exception("No StorageProvider configured"); | 59 | // Try reading the more specific [AssetService] section, if it exists |
60 | // | ||
61 | IConfig assetConfig = config.Configs["AssetService"]; | ||
62 | if (assetConfig != null) | ||
63 | { | ||
64 | dllName = assetConfig.GetString("StorageProvider", dllName); | ||
65 | connString = assetConfig.GetString("ConnectionString", connString); | ||
66 | } | ||
54 | 67 | ||
55 | string connString = assetConfig.GetString("ConnectionString", | 68 | // |
56 | String.Empty); | 69 | // We tried, but this doesn't exist. We can't proceed. |
70 | // | ||
71 | if (dllName.Equals(String.Empty)) | ||
72 | throw new Exception("No StorageProvider configured"); | ||
57 | 73 | ||
58 | m_Database = LoadPlugin<IAssetDataPlugin>(dllName); | 74 | m_Database = LoadPlugin<IAssetDataPlugin>(dllName); |
59 | if (m_Database == null) | 75 | if (m_Database == null) |