diff options
author | Justin Clark-Casey (justincc) | 2012-09-21 01:57:13 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-09-21 01:57:13 +0100 |
commit | 632a42e2b1e9a649be812ed57de1189778a370c9 (patch) | |
tree | b116df88151a3c76a5ff90a865bfd32ea5edebc5 | |
parent | Simplify UuidGatherer by performing asset fetch synchronously rather than usi... (diff) | |
download | opensim-SC_OLD-632a42e2b1e9a649be812ed57de1189778a370c9.zip opensim-SC_OLD-632a42e2b1e9a649be812ed57de1189778a370c9.tar.gz opensim-SC_OLD-632a42e2b1e9a649be812ed57de1189778a370c9.tar.bz2 opensim-SC_OLD-632a42e2b1e9a649be812ed57de1189778a370c9.tar.xz |
Rename UuidGather.m_assetCache to m_assetService. If HGUuidGatherer hasn't been instantiated with an assetServerURL then call down to overriden UuidGatherer.GetAsset() instead of calling m_assetService.GetAsset() itself - these two codepaths are now identical.
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/HGUuidGatherer.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 11 |
2 files changed, 6 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGUuidGatherer.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGUuidGatherer.cs index fcb544f..c7e1ef4 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGUuidGatherer.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGUuidGatherer.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
40 | protected string m_assetServerURL; | 40 | protected string m_assetServerURL; |
41 | protected HGAssetMapper m_assetMapper; | 41 | protected HGAssetMapper m_assetMapper; |
42 | 42 | ||
43 | public HGUuidGatherer(HGAssetMapper assMap, IAssetService assetCache, string assetServerURL) : base(assetCache) | 43 | public HGUuidGatherer(HGAssetMapper assMap, IAssetService assetService, string assetServerURL) : base(assetService) |
44 | { | 44 | { |
45 | m_assetMapper = assMap; | 45 | m_assetMapper = assMap; |
46 | m_assetServerURL = assetServerURL; | 46 | m_assetServerURL = assetServerURL; |
@@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
49 | protected override AssetBase GetAsset(UUID uuid) | 49 | protected override AssetBase GetAsset(UUID uuid) |
50 | { | 50 | { |
51 | if (string.Empty == m_assetServerURL) | 51 | if (string.Empty == m_assetServerURL) |
52 | return m_assetCache.Get(uuid.ToString()); | 52 | return base.GetAsset(uuid); |
53 | else | 53 | else |
54 | return m_assetMapper.FetchAsset(m_assetServerURL, uuid); | 54 | return m_assetMapper.FetchAsset(m_assetServerURL, uuid); |
55 | } | 55 | } |
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index af99090..dc4a082 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs | |||
@@ -52,11 +52,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
52 | public class UuidGatherer | 52 | public class UuidGatherer |
53 | { | 53 | { |
54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
55 | 55 | ||
56 | /// <summary> | 56 | protected IAssetService m_assetService; |
57 | /// Asset cache used for gathering assets | ||
58 | /// </summary> | ||
59 | protected IAssetService m_assetCache; | ||
60 | 57 | ||
61 | // /// <summary> | 58 | // /// <summary> |
62 | // /// Used as a temporary store of an asset which represents an object. This can be a null if no appropriate | 59 | // /// Used as a temporary store of an asset which represents an object. This can be a null if no appropriate |
@@ -71,7 +68,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
71 | 68 | ||
72 | public UuidGatherer(IAssetService assetCache) | 69 | public UuidGatherer(IAssetService assetCache) |
73 | { | 70 | { |
74 | m_assetCache = assetCache; | 71 | m_assetService = assetCache; |
75 | } | 72 | } |
76 | 73 | ||
77 | /// <summary> | 74 | /// <summary> |
@@ -216,7 +213,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
216 | /// <returns></returns> | 213 | /// <returns></returns> |
217 | protected virtual AssetBase GetAsset(UUID uuid) | 214 | protected virtual AssetBase GetAsset(UUID uuid) |
218 | { | 215 | { |
219 | return m_assetCache.Get(uuid.ToString()); | 216 | return m_assetService.Get(uuid.ToString()); |
220 | 217 | ||
221 | // XXX: Switching to do this synchronously where the call was async before but we always waited for it | 218 | // XXX: Switching to do this synchronously where the call was async before but we always waited for it |
222 | // to complete anyway! | 219 | // to complete anyway! |