aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/DAMap.cs
diff options
context:
space:
mode:
authorOren Hurvitz2013-01-22 11:59:20 +0200
committerJustin Clark-Casey (justincc)2013-01-25 04:03:26 +0000
commitaf6a7cf95df76708d013932d8ef92c9bbeda0e5d (patch)
treebf341a0cc35e0ed1516c9f0b5058d8c54a21cb13 /OpenSim/Framework/DAMap.cs
parentStore NULL in the 'DynAttrs' column if the prim doesn't have any dynamic attr... (diff)
downloadopensim-SC-af6a7cf95df76708d013932d8ef92c9bbeda0e5d.zip
opensim-SC-af6a7cf95df76708d013932d8ef92c9bbeda0e5d.tar.gz
opensim-SC-af6a7cf95df76708d013932d8ef92c9bbeda0e5d.tar.bz2
opensim-SC-af6a7cf95df76708d013932d8ef92c9bbeda0e5d.tar.xz
Added DynAttrs to the serialized XML format of prims. When copying prims, use deep copy for DynAttrs.
Diffstat (limited to 'OpenSim/Framework/DAMap.cs')
-rw-r--r--OpenSim/Framework/DAMap.cs26
1 files changed, 24 insertions, 2 deletions
diff --git a/OpenSim/Framework/DAMap.cs b/OpenSim/Framework/DAMap.cs
index c256230..291c8b8 100644
--- a/OpenSim/Framework/DAMap.cs
+++ b/OpenSim/Framework/DAMap.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Framework
67 67
68 public void ReadXml(string rawXml) 68 public void ReadXml(string rawXml)
69 { 69 {
70 //System.Console.WriteLine("Trying to deserialize [{0}]", rawXml); 70 // System.Console.WriteLine("Trying to deserialize [{0}]", rawXml);
71 71
72 lock (this) 72 lock (this)
73 m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml); 73 m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml);
@@ -87,7 +87,29 @@ namespace OpenSim.Framework
87 public void WriteXml(XmlWriter writer) 87 public void WriteXml(XmlWriter writer)
88 { 88 {
89 writer.WriteRaw(ToXml()); 89 writer.WriteRaw(ToXml());
90 } 90 }
91
92 public void CopyFrom(DAMap other)
93 {
94 // Deep copy
95
96 string data = null;
97 lock (other)
98 {
99 if (other.Count > 0)
100 {
101 data = OSDParser.SerializeLLSDXmlString(other.m_map);
102 }
103 }
104
105 lock (this)
106 {
107 if (data == null)
108 Clear();
109 else
110 m_map = (OSDMap)OSDParser.DeserializeLLSDXml(data);
111 }
112 }
91 113
92 /// <summary> 114 /// <summary>
93 /// Returns the number of data stores. 115 /// Returns the number of data stores.