aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-13 20:25:32 +0100
committerJustin Clark-Casey (justincc)2011-09-13 20:25:32 +0100
commit618277e797c7d501f98e884e50abd313498cf00b (patch)
tree7854d60ddb9d0ac5957194f274a41b44cfd636d7 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parentstop the duplicate remove of the root part ids from the full part and local p... (diff)
downloadopensim-SC-618277e797c7d501f98e884e50abd313498cf00b.zip
opensim-SC-618277e797c7d501f98e884e50abd313498cf00b.tar.gz
opensim-SC-618277e797c7d501f98e884e50abd313498cf00b.tar.bz2
opensim-SC-618277e797c7d501f98e884e50abd313498cf00b.tar.xz
Comment out attachments code in Scene.IncomingCreateObject(UUID userID, UUID itemID) for now
As far as I can see, this is only invoked by a PUT request to ObjectHandlers, which is not being used anyway. Invoking attachments code at this point is probably inappropriate since it would still be invoked when the client entered the scene. Being commented to simplify analysis of attachments issues. Can be uncommented when in use. Also, small tweak to lock and log removal of a SOG from the SceneObjectGroupsByLocalPartID collection in SceneGraph.GetGroupByPrim() if an inconsistency is found.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs25
1 files changed, 23 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 46c22ca..f03cf7b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -431,6 +431,10 @@ namespace OpenSim.Region.Framework.Scenes
431 /// <returns>true if the object was deleted, false if there was no object to delete</returns> 431 /// <returns>true if the object was deleted, false if there was no object to delete</returns>
432 public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked) 432 public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked)
433 { 433 {
434// m_log.DebugFormat(
435// "[SCENE GRAPH]: Deleting scene object with uuid {0}, resultOfObjectLinked = {1}",
436// uuid, resultOfObjectLinked);
437
434 EntityBase entity; 438 EntityBase entity;
435 if (!Entities.TryGetValue(uuid, out entity) || (!(entity is SceneObjectGroup))) 439 if (!Entities.TryGetValue(uuid, out entity) || (!(entity is SceneObjectGroup)))
436 return false; 440 return false;
@@ -878,7 +882,8 @@ namespace OpenSim.Region.Framework.Scenes
878 if (Entities.TryGetValue(localID, out entity)) 882 if (Entities.TryGetValue(localID, out entity))
879 return entity as SceneObjectGroup; 883 return entity as SceneObjectGroup;
880 884
881 //m_log.DebugFormat("Entered GetGroupByPrim with localID {0}", localID); 885// m_log.DebugFormat("[SCENE GRAPH]: Entered GetGroupByPrim with localID {0}", localID);
886
882 SceneObjectGroup sog; 887 SceneObjectGroup sog;
883 lock (SceneObjectGroupsByLocalPartID) 888 lock (SceneObjectGroupsByLocalPartID)
884 SceneObjectGroupsByLocalPartID.TryGetValue(localID, out sog); 889 SceneObjectGroupsByLocalPartID.TryGetValue(localID, out sog);
@@ -886,8 +891,24 @@ namespace OpenSim.Region.Framework.Scenes
886 if (sog != null) 891 if (sog != null)
887 { 892 {
888 if (sog.HasChildPrim(localID)) 893 if (sog.HasChildPrim(localID))
894 {
895// m_log.DebugFormat(
896// "[SCENE GRAPH]: Found scene object {0} {1} {2} containing part with local id {3} in {4}. Returning.",
897// sog.Name, sog.UUID, sog.LocalId, localID, m_parentScene.RegionInfo.RegionName);
898
889 return sog; 899 return sog;
890 SceneObjectGroupsByLocalPartID.Remove(localID); 900 }
901 else
902 {
903 lock (SceneObjectGroupsByLocalPartID)
904 {
905 m_log.WarnFormat(
906 "[SCENE GRAPH]: Found scene object {0} {1} {2} via SceneObjectGroupsByLocalPartID index but it doesn't contain part with local id {3}. Removing from entry from index in {4}.",
907 sog.Name, sog.UUID, sog.LocalId, localID, m_parentScene.RegionInfo.RegionName);
908
909 SceneObjectGroupsByLocalPartID.Remove(localID);
910 }
911 }
891 } 912 }
892 913
893 EntityBase[] entityList = GetEntities(); 914 EntityBase[] entityList = GetEntities();