aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-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.