diff options
author | Justin Clark-Casey (justincc) | 2013-02-02 02:57:38 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-02-02 02:57:38 +0000 |
commit | 9822bb664b58693790201606126e3fd26f7a4d52 (patch) | |
tree | 4acb0d5a5f569192de99b605b19dc77e5f0a7184 /OpenSim/Region/CoreModules | |
parent | Correct spelling mistake in new RayFilterFlags, LSLPhanton -> LSLPhantom (diff) | |
download | opensim-SC-9822bb664b58693790201606126e3fd26f7a4d52.zip opensim-SC-9822bb664b58693790201606126e3fd26f7a4d52.tar.gz opensim-SC-9822bb664b58693790201606126e3fd26f7a4d52.tar.bz2 opensim-SC-9822bb664b58693790201606126e3fd26f7a4d52.tar.xz |
Log missing assets on "fcache assets" found. This ignores references found by scanning LSL/notecard files since these are the source of false positives.
This also changes UuidGatherer to reutn an AssetType.Unknown for embedded script/lsl references instead of Texture, since these are often not textures.
This is added to help people in determining when they have missing assets such as textures, etc.
In this case, one wants to run "fcache clear" first.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 8e800cb..00af175 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -707,32 +707,43 @@ namespace OpenSim.Region.CoreModules.Asset | |||
707 | { | 707 | { |
708 | UuidGatherer gatherer = new UuidGatherer(m_AssetService); | 708 | UuidGatherer gatherer = new UuidGatherer(m_AssetService); |
709 | 709 | ||
710 | HashSet<UUID> uniqueUuids = new HashSet<UUID>(); | ||
710 | Dictionary<UUID, AssetType> assets = new Dictionary<UUID, AssetType>(); | 711 | Dictionary<UUID, AssetType> assets = new Dictionary<UUID, AssetType>(); |
712 | |||
711 | foreach (Scene s in m_Scenes) | 713 | foreach (Scene s in m_Scenes) |
712 | { | 714 | { |
713 | StampRegionStatusFile(s.RegionInfo.RegionID); | 715 | StampRegionStatusFile(s.RegionInfo.RegionID); |
714 | 716 | ||
715 | s.ForEachSOG(delegate(SceneObjectGroup e) | 717 | s.ForEachSOG(delegate(SceneObjectGroup e) |
716 | { | 718 | { |
717 | gatherer.GatherAssetUuids(e, assets); | 719 | gatherer.GatherAssetUuids(e, assets); |
718 | }); | ||
719 | } | ||
720 | 720 | ||
721 | foreach (UUID assetID in assets.Keys) | 721 | foreach (UUID assetID in assets.Keys) |
722 | { | 722 | { |
723 | string filename = GetFileName(assetID.ToString()); | 723 | uniqueUuids.Add(assetID); |
724 | 724 | ||
725 | if (File.Exists(filename)) | 725 | string filename = GetFileName(assetID.ToString()); |
726 | { | 726 | |
727 | File.SetLastAccessTime(filename, DateTime.Now); | 727 | if (File.Exists(filename)) |
728 | } | 728 | { |
729 | else if (storeUncached) | 729 | File.SetLastAccessTime(filename, DateTime.Now); |
730 | { | 730 | } |
731 | m_AssetService.Get(assetID.ToString()); | 731 | else if (storeUncached) |
732 | } | 732 | { |
733 | AssetBase cachedAsset = m_AssetService.Get(assetID.ToString()); | ||
734 | if (cachedAsset == null && assets[assetID] != AssetType.Unknown) | ||
735 | m_log.DebugFormat( | ||
736 | "[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", | ||
737 | assetID, assets[assetID], e.Name, e.AbsolutePosition, s.Name); | ||
738 | } | ||
739 | } | ||
740 | |||
741 | assets.Clear(); | ||
742 | }); | ||
733 | } | 743 | } |
734 | 744 | ||
735 | return assets.Keys.Count; | 745 | |
746 | return uniqueUuids.Count; | ||
736 | } | 747 | } |
737 | 748 | ||
738 | /// <summary> | 749 | /// <summary> |