aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorDiva Canto2011-12-30 21:32:28 -0800
committerDiva Canto2011-12-30 21:32:28 -0800
commit56dbcae402000e199e556827944dfdd1bb3a64be (patch)
tree992e340007201e4c4884cc17cf616a112b6befe3 /OpenSim/Region/Framework/Scenes
parentBring back the Hyperlinker to the Robust console. Moved the config to [GridSe... (diff)
downloadopensim-SC-56dbcae402000e199e556827944dfdd1bb3a64be.zip
opensim-SC-56dbcae402000e199e556827944dfdd1bb3a64be.tar.gz
opensim-SC-56dbcae402000e199e556827944dfdd1bb3a64be.tar.bz2
opensim-SC-56dbcae402000e199e556827944dfdd1bb3a64be.tar.xz
Bug fix in map tiles in standalone: the map has been blank since commit 01ae916bad672722aa62ee712b7b580d6f5f4370 r/17324 (Nov.18, justincc). But the root cause comes from commit 02e54c57c4901167779f07ed3e89fb1d24ffc22a Author: Oren Hurvitz Date: 7/22/2011
This is a nasty situation. The map tile UUID is, in principle, stored authoritatively in RegionSettings. However, it also needs to be stored in the Grid Service because that's how other sims can retrieve it to send it in Map Blocks to non-V3 viewers. So every time the tile image changes, that change needs to propagate to the Grid Service, and this is done via RegisterRegion (ugh!). Interestingly, this problem didn't affect grids because by default AllowRemoteDelete is false, so the prior images aren't being deleted from the asset servers -- but they were not being correctly updated in the map either, the map was stuck with old images.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs33
1 files changed, 20 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index b4972d6..0f84da9 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -710,7 +710,7 @@ namespace OpenSim.Region.Framework.Scenes
710 if (maptileRefresh != 0) 710 if (maptileRefresh != 0)
711 { 711 {
712 m_mapGenerationTimer.Interval = maptileRefresh * 1000; 712 m_mapGenerationTimer.Interval = maptileRefresh * 1000;
713 m_mapGenerationTimer.Elapsed += RegenerateMaptile; 713 m_mapGenerationTimer.Elapsed += RegenerateMaptileAndReregister;
714 m_mapGenerationTimer.AutoReset = true; 714 m_mapGenerationTimer.AutoReset = true;
715 m_mapGenerationTimer.Start(); 715 m_mapGenerationTimer.Start();
716 } 716 }
@@ -1647,21 +1647,17 @@ namespace OpenSim.Region.Framework.Scenes
1647 { 1647 {
1648 m_sceneGridService.SetScene(this); 1648 m_sceneGridService.SetScene(this);
1649 1649
1650 //// Unfortunately this needs to be here and it can't be async.
1651 //// The map tile image is stored in RegionSettings, but it also needs to be
1652 //// stored in the GridService, because that's what the world map module uses
1653 //// to send the map image UUIDs (of other regions) to the viewer...
1654 if (m_generateMaptiles)
1655 RegenerateMaptile();
1656
1650 GridRegion region = new GridRegion(RegionInfo); 1657 GridRegion region = new GridRegion(RegionInfo);
1651 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); 1658 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
1652 if (error != String.Empty) 1659 if (error != String.Empty)
1653 {
1654 throw new Exception(error); 1660 throw new Exception(error);
1655 }
1656
1657 // Generate the maptile asynchronously, because sometimes it can be very slow and we
1658 // don't want this to delay starting the region.
1659 if (m_generateMaptiles)
1660 {
1661 Util.FireAndForget(delegate {
1662 RegenerateMaptile(null, null);
1663 });
1664 }
1665 } 1661 }
1666 1662
1667 #endregion 1663 #endregion
@@ -5032,13 +5028,24 @@ namespace OpenSim.Region.Framework.Scenes
5032 /// </summary> 5028 /// </summary>
5033 /// <param name="sender"></param> 5029 /// <param name="sender"></param>
5034 /// <param name="e"></param> 5030 /// <param name="e"></param>
5035 public void RegenerateMaptile(object sender, ElapsedEventArgs e) 5031 private void RegenerateMaptile()
5036 { 5032 {
5037 IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>(); 5033 IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>();
5038 if (mapModule != null) 5034 if (mapModule != null)
5039 mapModule.GenerateMaptile(); 5035 mapModule.GenerateMaptile();
5040 } 5036 }
5041 5037
5038 private void RegenerateMaptileAndReregister(object sender, ElapsedEventArgs e)
5039 {
5040 RegenerateMaptile();
5041
5042 // We need to propagate the new image UUID to the grid service
5043 // so that all simulators can retrieve it
5044 string error = GridService.RegisterRegion(RegionInfo.ScopeID, new GridRegion(RegionInfo));
5045 if (error != string.Empty)
5046 throw new Exception(error);
5047 }
5048
5042 // This method is called across the simulation connector to 5049 // This method is called across the simulation connector to
5043 // determine if a given agent is allowed in this region 5050 // determine if a given agent is allowed in this region
5044 // AS A ROOT AGENT. Returning false here will prevent them 5051 // AS A ROOT AGENT. Returning false here will prevent them