From 08606ae409b400b6f9b83006ed04826eede8a9c7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 8 Jan 2015 20:21:40 +0000 Subject: Make the IteratingUuidGatherer the only UuidGatherer. This UUID gatherer provides a superset of the previous gatherer's functionality as it also allows the caller to control gathering iterations for load purposes. --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/CoreModules/Asset') diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 59b30a9..7d9c9a9 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -776,7 +776,6 @@ namespace OpenSim.Region.CoreModules.Asset { UuidGatherer gatherer = new UuidGatherer(m_AssetService); - Dictionary assetIdsToCheck = new Dictionary(); Dictionary assetsFound = new Dictionary(); foreach (Scene s in m_Scenes) @@ -784,10 +783,11 @@ namespace OpenSim.Region.CoreModules.Asset StampRegionStatusFile(s.RegionInfo.RegionID); s.ForEachSOG(delegate(SceneObjectGroup e) - { - gatherer.GatherAssetUuids(e, assetIdsToCheck); + { + gatherer.AddForInspection(e); + gatherer.GatherAll(); - foreach (UUID assetID in assetIdsToCheck.Keys) + foreach (UUID assetID in gatherer.GatheredUuids.Keys) { if (!assetsFound.ContainsKey(assetID)) { @@ -800,7 +800,7 @@ namespace OpenSim.Region.CoreModules.Asset else if (storeUncached) { AssetBase cachedAsset = m_AssetService.Get(assetID.ToString()); - if (cachedAsset == null && assetIdsToCheck[assetID] != (sbyte)AssetType.Unknown) + if (cachedAsset == null && gatherer.GatheredUuids[assetID] != (sbyte)AssetType.Unknown) assetsFound[assetID] = false; else assetsFound[assetID] = true; @@ -810,11 +810,11 @@ namespace OpenSim.Region.CoreModules.Asset { m_log.DebugFormat( "[FLOTSAM ASSET CACHE]: Could not find asset {0}, type {1} referenced by object {2} at {3} in scene {4} when pre-caching all scene assets", - assetID, assetIdsToCheck[assetID], e.Name, e.AbsolutePosition, s.Name); + assetID, gatherer.GatheredUuids[assetID], e.Name, e.AbsolutePosition, s.Name); } } - assetIdsToCheck.Clear(); + gatherer.GatheredUuids.Clear(); }); } -- cgit v1.1