diff options
author | Melanie | 2013-02-04 19:21:39 +0000 |
---|---|---|
committer | Melanie | 2013-02-04 19:21:39 +0000 |
commit | 7482ad1c22e44e03c1a36f1d67d862084c20dae6 (patch) | |
tree | 9450dd7cbe79e1d34b6d0519d994b1fd16a253ed /OpenSim/Region/CoreModules/Asset | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-7482ad1c22e44e03c1a36f1d67d862084c20dae6.zip opensim-SC-7482ad1c22e44e03c1a36f1d67d862084c20dae6.tar.gz opensim-SC-7482ad1c22e44e03c1a36f1d67d862084c20dae6.tar.bz2 opensim-SC-7482ad1c22e44e03c1a36f1d67d862084c20dae6.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/CoreModules/Asset')
-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 a0f1e8c..730643d 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -790,32 +790,43 @@ namespace OpenSim.Region.CoreModules.Asset | |||
790 | { | 790 | { |
791 | UuidGatherer gatherer = new UuidGatherer(m_AssetService); | 791 | UuidGatherer gatherer = new UuidGatherer(m_AssetService); |
792 | 792 | ||
793 | HashSet<UUID> uniqueUuids = new HashSet<UUID>(); | ||
793 | Dictionary<UUID, AssetType> assets = new Dictionary<UUID, AssetType>(); | 794 | Dictionary<UUID, AssetType> assets = new Dictionary<UUID, AssetType>(); |
795 | |||
794 | foreach (Scene s in m_Scenes) | 796 | foreach (Scene s in m_Scenes) |
795 | { | 797 | { |
796 | StampRegionStatusFile(s.RegionInfo.RegionID); | 798 | StampRegionStatusFile(s.RegionInfo.RegionID); |
797 | 799 | ||
798 | s.ForEachSOG(delegate(SceneObjectGroup e) | 800 | s.ForEachSOG(delegate(SceneObjectGroup e) |
799 | { | 801 | { |
800 | gatherer.GatherAssetUuids(e, assets); | 802 | gatherer.GatherAssetUuids(e, assets); |
801 | }); | ||
802 | } | ||
803 | 803 | ||
804 | foreach (UUID assetID in assets.Keys) | 804 | foreach (UUID assetID in assets.Keys) |
805 | { | 805 | { |
806 | string filename = GetFileName(assetID.ToString()); | 806 | uniqueUuids.Add(assetID); |
807 | 807 | ||
808 | if (File.Exists(filename)) | 808 | string filename = GetFileName(assetID.ToString()); |
809 | { | 809 | |
810 | File.SetLastAccessTime(filename, DateTime.Now); | 810 | if (File.Exists(filename)) |
811 | } | 811 | { |
812 | else if (storeUncached) | 812 | File.SetLastAccessTime(filename, DateTime.Now); |
813 | { | 813 | } |
814 | m_AssetService.Get(assetID.ToString()); | 814 | else if (storeUncached) |
815 | } | 815 | { |
816 | AssetBase cachedAsset = m_AssetService.Get(assetID.ToString()); | ||
817 | if (cachedAsset == null && assets[assetID] != AssetType.Unknown) | ||
818 | m_log.DebugFormat( | ||
819 | "[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", | ||
820 | assetID, assets[assetID], e.Name, e.AbsolutePosition, s.Name); | ||
821 | } | ||
822 | } | ||
823 | |||
824 | assets.Clear(); | ||
825 | }); | ||
816 | } | 826 | } |
817 | 827 | ||
818 | return assets.Keys.Count; | 828 | |
829 | return uniqueUuids.Count; | ||
819 | } | 830 | } |
820 | 831 | ||
821 | /// <summary> | 832 | /// <summary> |