aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
diff options
context:
space:
mode:
authorDiva Canto2012-09-21 16:45:16 -0700
committerDiva Canto2012-09-21 16:45:16 -0700
commitcfa022700d3d099eee7cd25d18da875639506ea8 (patch)
tree2c193bfed4ba508fe67914620b80a55f3a4b973a /OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
parentRemoved redundant asset fetches on HGAssetMapper. The UuidGatherer already do... (diff)
downloadopensim-SC_OLD-cfa022700d3d099eee7cd25d18da875639506ea8.zip
opensim-SC_OLD-cfa022700d3d099eee7cd25d18da875639506ea8.tar.gz
opensim-SC_OLD-cfa022700d3d099eee7cd25d18da875639506ea8.tar.bz2
opensim-SC_OLD-cfa022700d3d099eee7cd25d18da875639506ea8.tar.xz
Moved the small HGUuidGatherer class to the file where its parent class is. No need to keep 2 separate files.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs19
1 files changed, 2 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
index dd0ea1c..6f62856 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
@@ -86,21 +86,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
86 return meta; 86 return meta;
87 } 87 }
88 88
89 public AssetBase FetchAsset(string url, UUID assetID)
90 {
91 if (!url.EndsWith("/") && !url.EndsWith("="))
92 url = url + "/";
93
94 AssetBase asset = m_scene.AssetService.Get(url + assetID.ToString());
95
96 if (asset != null)
97 {
98 m_log.DebugFormat("[HG ASSET MAPPER]: Copied asset {0} from {1} to local asset server. ", asset.ID, url);
99 return asset;
100 }
101 return null;
102 }
103
104 public bool PostAsset(string url, AssetBase asset) 89 public bool PostAsset(string url, AssetBase asset)
105 { 90 {
106 if (asset != null) 91 if (asset != null)
@@ -245,7 +230,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
245 230
246 // The act of gathering UUIDs downloads the assets from the remote server 231 // The act of gathering UUIDs downloads the assets from the remote server
247 Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>(); 232 Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>();
248 HGUuidGatherer uuidGatherer = new HGUuidGatherer(this, m_scene.AssetService, userAssetURL); 233 HGUuidGatherer uuidGatherer = new HGUuidGatherer(m_scene.AssetService, userAssetURL);
249 uuidGatherer.GatherAssetUuids(assetID, (AssetType)meta.Type, ids); 234 uuidGatherer.GatherAssetUuids(assetID, (AssetType)meta.Type, ids);
250 235
251 m_log.DebugFormat("[HG ASSET MAPPER]: Successfully fetched asset {0} from asset server {1}", assetID, userAssetURL); 236 m_log.DebugFormat("[HG ASSET MAPPER]: Successfully fetched asset {0} from asset server {1}", assetID, userAssetURL);
@@ -263,7 +248,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
263 if (asset != null) 248 if (asset != null)
264 { 249 {
265 Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>(); 250 Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>();
266 HGUuidGatherer uuidGatherer = new HGUuidGatherer(this, m_scene.AssetService, string.Empty); 251 HGUuidGatherer uuidGatherer = new HGUuidGatherer(m_scene.AssetService, string.Empty);
267 uuidGatherer.GatherAssetUuids(asset.FullID, (AssetType)asset.Type, ids); 252 uuidGatherer.GatherAssetUuids(asset.FullID, (AssetType)asset.Type, ids);
268 bool success = false; 253 bool success = false;
269 foreach (UUID uuid in ids.Keys) 254 foreach (UUID uuid in ids.Keys)