aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-01-30 19:21:58 +0000
committerJustin Clark-Casey (justincc)2012-01-30 19:21:58 +0000
commit9d93c4808e0a0171bcb43fc551f3fb37b684c499 (patch)
tree5aa73c9c71f6c6f214b960a97c503530b09db50b /OpenSim/Region/Framework/Scenes
parentRevert "Pickup map overlay tile from RegionSettings.ParcelImageID" (diff)
downloadopensim-SC-9d93c4808e0a0171bcb43fc551f3fb37b684c499.zip
opensim-SC-9d93c4808e0a0171bcb43fc551f3fb37b684c499.tar.gz
opensim-SC-9d93c4808e0a0171bcb43fc551f3fb37b684c499.tar.bz2
opensim-SC-9d93c4808e0a0171bcb43fc551f3fb37b684c499.tar.xz
lock SceneObjectGroupsByFullID in SceneGraph.ForEachSOG() to stop failure if SceneObjectGroupsByFullID is updated elsewhere at the same time.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 7f18140..36a454e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1137,8 +1137,10 @@ namespace OpenSim.Region.Framework.Scenes
1137 /// <param name="action"></param> 1137 /// <param name="action"></param>
1138 protected internal void ForEachSOG(Action<SceneObjectGroup> action) 1138 protected internal void ForEachSOG(Action<SceneObjectGroup> action)
1139 { 1139 {
1140 // FIXME: Need to lock here, really. 1140 List<SceneObjectGroup> objlist;
1141 List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(SceneObjectGroupsByFullID.Values); 1141 lock (SceneObjectGroupsByFullID)
1142 objlist = new List<SceneObjectGroup>(SceneObjectGroupsByFullID.Values);
1143
1142 foreach (SceneObjectGroup obj in objlist) 1144 foreach (SceneObjectGroup obj in objlist)
1143 { 1145 {
1144 try 1146 try
@@ -1147,7 +1149,7 @@ namespace OpenSim.Region.Framework.Scenes
1147 } 1149 }
1148 catch (Exception e) 1150 catch (Exception e)
1149 { 1151 {
1150 // Catch it and move on. This includes situations where splist has inconsistent info 1152 // Catch it and move on. This includes situations where objlist has inconsistent info
1151 m_log.WarnFormat( 1153 m_log.WarnFormat(
1152 "[SCENEGRAPH]: Problem processing action in ForEachSOG: {0} {1}", e.Message, e.StackTrace); 1154 "[SCENEGRAPH]: Problem processing action in ForEachSOG: {0} {1}", e.Message, e.StackTrace);
1153 } 1155 }
@@ -1382,10 +1384,10 @@ namespace OpenSim.Region.Framework.Scenes
1382 /// <summary> 1384 /// <summary>
1383 /// Update the texture entry of the given prim. 1385 /// Update the texture entry of the given prim.
1384 /// </summary> 1386 /// </summary>
1385 /// 1387 /// <remarks>
1386 /// A texture entry is an object that contains details of all the textures of the prim's face. In this case, 1388 /// A texture entry is an object that contains details of all the textures of the prim's face. In this case,
1387 /// the texture is given in its byte serialized form. 1389 /// the texture is given in its byte serialized form.
1388 /// 1390 /// </remarks>
1389 /// <param name="localID"></param> 1391 /// <param name="localID"></param>
1390 /// <param name="texture"></param> 1392 /// <param name="texture"></param>
1391 /// <param name="remoteClient"></param> 1393 /// <param name="remoteClient"></param>