diff options
author | diva | 2009-05-23 17:51:13 +0000 |
---|---|---|
committer | diva | 2009-05-23 17:51:13 +0000 |
commit | fb6d314d4db0a157799a1d49a5f467f1c051ec9b (patch) | |
tree | 3a5f7c8d3f91722d6a32ee85b7031dfb4c2de6b0 /OpenSim/Region/Framework/Scenes/Hypergrid/HGUuidGatherer.cs | |
parent | Added one missing config var for HG standalones. (diff) | |
download | opensim-SC-fb6d314d4db0a157799a1d49a5f467f1c051ec9b.zip opensim-SC-fb6d314d4db0a157799a1d49a5f467f1c051ec9b.tar.gz opensim-SC-fb6d314d4db0a157799a1d49a5f467f1c051ec9b.tar.bz2 opensim-SC-fb6d314d4db0a157799a1d49a5f467f1c051ec9b.tar.xz |
This should make HG asset transfers work much better. It now uses HGUuidGatherer, which is a subclass of UuidGatherer. Hence, on-line HG asset transfers use exactly the same UUID collection code as save oar/xml. If it doesn't work, it's Justin's fault :D
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Hypergrid/HGUuidGatherer.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGUuidGatherer.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGUuidGatherer.cs new file mode 100644 index 0000000..e83478d --- /dev/null +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGUuidGatherer.cs | |||
@@ -0,0 +1,29 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | |||
4 | using OpenSim.Framework; | ||
5 | using OpenSim.Services.Interfaces; | ||
6 | using OpenMetaverse; | ||
7 | |||
8 | namespace OpenSim.Region.Framework.Scenes.Hypergrid | ||
9 | { | ||
10 | public class HGUuidGatherer : UuidGatherer | ||
11 | { | ||
12 | protected string m_assetServerURL; | ||
13 | protected HGAssetMapper m_assetMapper; | ||
14 | |||
15 | public HGUuidGatherer(HGAssetMapper assMap, IAssetService assetCache, string assetServerURL) : base(assetCache) | ||
16 | { | ||
17 | m_assetMapper = assMap; | ||
18 | m_assetServerURL = assetServerURL; | ||
19 | } | ||
20 | |||
21 | protected override AssetBase GetAsset(UUID uuid) | ||
22 | { | ||
23 | if (string.Empty == m_assetServerURL) | ||
24 | return m_assetCache.Get(uuid.ToString()); | ||
25 | else | ||
26 | return m_assetMapper.FetchAsset(m_assetServerURL, uuid); | ||
27 | } | ||
28 | } | ||
29 | } | ||