diff options
author | teravus | 2013-02-03 08:14:47 -0500 |
---|---|---|
committer | teravus | 2013-02-03 08:14:47 -0500 |
commit | 8fd99ecab14c06ef61b8e6d8c5a3a1452669639b (patch) | |
tree | 0ef3d872a7f7a72941f7aebb5d15042681ff6697 /OpenSim/Region/CoreModules | |
parent | Adds the ability to load more then one IClientNetworkServer thereby allowing ... (diff) | |
parent | Merge /home/opensim/src/opensim (diff) | |
download | opensim-SC-8fd99ecab14c06ef61b8e6d8c5a3a1452669639b.zip opensim-SC-8fd99ecab14c06ef61b8e6d8c5a3a1452669639b.tar.gz opensim-SC-8fd99ecab14c06ef61b8e6d8c5a3a1452669639b.tar.bz2 opensim-SC-8fd99ecab14c06ef61b8e6d8c5a3a1452669639b.tar.xz |
Merge branch 'master' of ssh://opensim/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
3 files changed, 44 insertions, 22 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> |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index a839086..26d22b8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | |||
@@ -75,7 +75,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
75 | public void Close() { } | 75 | public void Close() { } |
76 | public void PostInitialise() { } | 76 | public void PostInitialise() { } |
77 | 77 | ||
78 | |||
79 | ///<summary> | 78 | ///<summary> |
80 | /// | 79 | /// |
81 | ///</summary> | 80 | ///</summary> |
@@ -133,7 +132,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
133 | ///</summary> | 132 | ///</summary> |
134 | public void AddRegion(Scene scene) | 133 | public void AddRegion(Scene scene) |
135 | { | 134 | { |
136 | if (! m_enabled) | 135 | if (!m_enabled) |
137 | return; | 136 | return; |
138 | 137 | ||
139 | // Every shared region module has to maintain an indepedent list of | 138 | // Every shared region module has to maintain an indepedent list of |
@@ -206,6 +205,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
206 | 205 | ||
207 | using (Image mapTile = tileGenerator.CreateMapTile()) | 206 | using (Image mapTile = tileGenerator.CreateMapTile()) |
208 | { | 207 | { |
208 | // XXX: The MapImageModule will return a null if the user has chosen not to create map tiles and there | ||
209 | // is no static map tile. | ||
210 | if (mapTile == null) | ||
211 | return; | ||
212 | |||
209 | using (MemoryStream stream = new MemoryStream()) | 213 | using (MemoryStream stream = new MemoryStream()) |
210 | { | 214 | { |
211 | mapTile.Save(stream, ImageFormat.Jpeg); | 215 | mapTile.Save(stream, ImageFormat.Jpeg); |
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs index d412efc..e7065dc 100644 --- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs | |||
@@ -113,7 +113,6 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap | |||
113 | //t = System.Environment.TickCount - t; | 113 | //t = System.Environment.TickCount - t; |
114 | //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t); | 114 | //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t); |
115 | 115 | ||
116 | |||
117 | if (drawPrimVolume) | 116 | if (drawPrimVolume) |
118 | { | 117 | { |
119 | DrawObjectVolume(m_scene, mapbmp); | 118 | DrawObjectVolume(m_scene, mapbmp); |
@@ -121,7 +120,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap | |||
121 | } | 120 | } |
122 | else | 121 | else |
123 | { | 122 | { |
124 | mapbmp = fetchTexture(m_scene.RegionInfo.RegionSettings.TerrainImageID); | 123 | mapbmp = FetchTexture(m_scene.RegionInfo.RegionSettings.TerrainImageID); |
125 | } | 124 | } |
126 | return mapbmp; | 125 | return mapbmp; |
127 | } | 126 | } |
@@ -232,11 +231,19 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap | |||
232 | // } | 231 | // } |
233 | // } | 232 | // } |
234 | 233 | ||
235 | private Bitmap fetchTexture(UUID id) | 234 | private Bitmap FetchTexture(UUID id) |
236 | { | 235 | { |
237 | AssetBase asset = m_scene.AssetService.Get(id.ToString()); | 236 | AssetBase asset = m_scene.AssetService.Get(id.ToString()); |
238 | m_log.DebugFormat("[MAPTILE]: Fetched static texture {0}, found: {1}", id, asset != null); | 237 | |
239 | if (asset == null) return null; | 238 | if (asset != null) |
239 | { | ||
240 | m_log.DebugFormat("[MAPTILE]: Static map image texture {0} found for {1}", id, m_scene.Name); | ||
241 | } | ||
242 | else | ||
243 | { | ||
244 | m_log.WarnFormat("[MAPTILE]: Static map image texture {0} not found for {1}", id, m_scene.Name); | ||
245 | return null; | ||
246 | } | ||
240 | 247 | ||
241 | ManagedImage managedImage; | 248 | ManagedImage managedImage; |
242 | Image image; | 249 | Image image; |