aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2016-06-21 20:28:25 -0700
committerDiva Canto2016-06-21 20:28:25 -0700
commitf19199cf4a6ef9cdcfbdbff3a1f604f595216f65 (patch)
tree184490c83696d6d77b1d8164a502b8862aadeeaa
parentGuard against multiple calls to SetOwnerId on one logical ownership change. (diff)
downloadopensim-SC_OLD-f19199cf4a6ef9cdcfbdbff3a1f604f595216f65.zip
opensim-SC_OLD-f19199cf4a6ef9cdcfbdbff3a1f604f595216f65.tar.gz
opensim-SC_OLD-f19199cf4a6ef9cdcfbdbff3a1f604f595216f65.tar.bz2
opensim-SC_OLD-f19199cf4a6ef9cdcfbdbff3a1f604f595216f65.tar.xz
Mantis #7932: Some objects were being serialized with PCode=9 and State != 0 (meaning attachments). That should never happen.
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 7d3a168..795da3f 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1671,7 +1671,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1671 writer.WriteElementString("ProfileBegin", shp.ProfileBegin.ToString()); 1671 writer.WriteElementString("ProfileBegin", shp.ProfileBegin.ToString());
1672 writer.WriteElementString("ProfileEnd", shp.ProfileEnd.ToString()); 1672 writer.WriteElementString("ProfileEnd", shp.ProfileEnd.ToString());
1673 writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString()); 1673 writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString());
1674 writer.WriteElementString("State", shp.State.ToString()); 1674 // There's no such thing as a primitive with state != 0 (attachment)
1675 writer.WriteElementString("State", (shp.PCode == (byte)PCodeEnum.Primitive ? "0" : shp.State.ToString()));
1675 writer.WriteElementString("LastAttachPoint", shp.LastAttachPoint.ToString()); 1676 writer.WriteElementString("LastAttachPoint", shp.LastAttachPoint.ToString());
1676 1677
1677 WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options); 1678 WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options);
@@ -1799,6 +1800,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1799 1800
1800 reader.ReadEndElement(); // Shape 1801 reader.ReadEndElement(); // Shape
1801 1802
1803 if (shape.PCode == (byte)PCodeEnum.Primitive && shape.State != 0)
1804 // This should not happen!
1805 shape.State = 0;
1806
1802 errorNodeNames = internalErrorNodeNames; 1807 errorNodeNames = internalErrorNodeNames;
1803 1808
1804 return shape; 1809 return shape;