aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
index 28f838d..193927d 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
@@ -66,14 +66,18 @@ namespace OpenSim.Region.Capabilities
66 if (fieldAttributes.Length > 0) 66 if (fieldAttributes.Length > 0)
67 { 67 {
68 writer.WriteStartElement(String.Empty, "key", String.Empty); 68 writer.WriteStartElement(String.Empty, "key", String.Empty);
69 writer.WriteString(fields[i].Name); 69 string fieldName = fields[i].Name;
70 fieldName = fieldName.Replace("___", "-");
71 writer.WriteString(fieldName);
70 writer.WriteEndElement(); 72 writer.WriteEndElement();
71 SerializeLLSDType(writer, fieldValue); 73 SerializeLLSDType(writer, fieldValue);
72 } 74 }
73 else 75 else
74 { 76 {
75 writer.WriteStartElement(String.Empty, "key", String.Empty); 77 writer.WriteStartElement(String.Empty, "key", String.Empty);
76 writer.WriteString(fields[i].Name); 78 string fieldName = fields[i].Name;
79 fieldName = fieldName.Replace("___", "-");
80 writer.WriteString(fieldName);
77 writer.WriteEndElement(); 81 writer.WriteEndElement();
78 LLSD.LLSDWriteOne(writer, fieldValue); 82 LLSD.LLSDWriteOne(writer, fieldValue);
79 // libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( 83 // libsecondlife.StructuredData.LLSDParser.SerializeXmlElement(
@@ -118,7 +122,9 @@ namespace OpenSim.Region.Capabilities
118 IDictionaryEnumerator enumerator = llsd.GetEnumerator(); 122 IDictionaryEnumerator enumerator = llsd.GetEnumerator();
119 while (enumerator.MoveNext()) 123 while (enumerator.MoveNext())
120 { 124 {
121 FieldInfo field = myType.GetField((string) enumerator.Key); 125 string keyName = (string)enumerator.Key;
126 keyName = keyName.Replace("-","_");
127 FieldInfo field = myType.GetField(keyName);
122 if (field != null) 128 if (field != null)
123 { 129 {
124 // if (enumerator.Value is libsecondlife.StructuredData.LLSDMap) 130 // if (enumerator.Value is libsecondlife.StructuredData.LLSDMap)