aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs2
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs18
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs6
3 files changed, 15 insertions, 11 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index 4603280..f7cb20c 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -258,7 +258,7 @@ namespace OpenSim.Region.Capabilities
258 /// <returns></returns> 258 /// <returns></returns>
259 public string NoteCardAgentInventory(string request, string path, string param) 259 public string NoteCardAgentInventory(string request, string path, string param)
260 { 260 {
261 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); 261 libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)libsecondlife.StructuredData.LLSDParser.DeserializeBinary(Helpers.StringToField(request));
262 LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); 262 LLSDItemUpdate llsdRequest = new LLSDItemUpdate();
263 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); 263 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
264 264
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
index 8252a63..793c366 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Capabilities
48 return sw.ToString(); 48 return sw.ToString();
49 } 49 }
50 50
51 public static void SerializeLLSDType(XmlTextWriter writer, object obj) 51 private static void SerializeLLSDType(XmlTextWriter writer, object obj)
52 { 52 {
53 Type myType = obj.GetType(); 53 Type myType = obj.GetType();
54 LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false); 54 LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false);
@@ -76,7 +76,8 @@ namespace OpenSim.Region.Capabilities
76 writer.WriteStartElement(String.Empty, "key", String.Empty); 76 writer.WriteStartElement(String.Empty, "key", String.Empty);
77 writer.WriteString(fields[i].Name); 77 writer.WriteString(fields[i].Name);
78 writer.WriteEndElement(); 78 writer.WriteEndElement();
79 LLSD.LLSDWriteOne(writer, fieldValue); 79 libsecondlife.StructuredData.LLSDParser.SerializeXmlElement(
80 writer, libsecondlife.StructuredData.LLSD.FromObject(fieldValue));
80 } 81 }
81 } 82 }
82 writer.WriteEndElement(); 83 writer.WriteEndElement();
@@ -99,11 +100,12 @@ namespace OpenSim.Region.Capabilities
99 } 100 }
100 else 101 else
101 { 102 {
102 LLSD.LLSDWriteOne(writer, obj); 103 libsecondlife.StructuredData.LLSDParser.SerializeXmlElement(
104 writer, libsecondlife.StructuredData.LLSD.FromObject(obj));
103 } 105 }
104 } 106 }
105 107
106 public static object DeserialiseLLSDMap(Hashtable llsd, object obj) 108 public static object DeserialiseLLSDMap(libsecondlife.StructuredData.LLSDMap llsd, object obj)
107 { 109 {
108 Type myType = obj.GetType(); 110 Type myType = obj.GetType();
109 LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false); 111 LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false);
@@ -118,10 +120,10 @@ namespace OpenSim.Region.Capabilities
118 FieldInfo field = myType.GetField((string) enumerator.Key); 120 FieldInfo field = myType.GetField((string) enumerator.Key);
119 if (field != null) 121 if (field != null)
120 { 122 {
121 if (enumerator.Value is Hashtable) 123 if (enumerator.Value is libsecondlife.StructuredData.LLSDMap)
122 { 124 {
123 object fieldValue = field.GetValue(obj); 125 object fieldValue = field.GetValue(obj);
124 DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue); 126 DeserialiseLLSDMap((libsecondlife.StructuredData.LLSDMap) enumerator.Value, fieldValue);
125 } 127 }
126 else if (enumerator.Value is ArrayList) 128 else if (enumerator.Value is ArrayList)
127 { 129 {
@@ -143,4 +145,4 @@ namespace OpenSim.Region.Capabilities
143 return obj; 145 return obj;
144 } 146 }
145 } 147 }
146} \ No newline at end of file 148}
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
index 08e9563..ed25e71 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
@@ -31,6 +31,7 @@ using System.IO;
31using System.Text; 31using System.Text;
32using libsecondlife; 32using libsecondlife;
33using OpenSim.Framework.Servers; 33using OpenSim.Framework.Servers;
34using System.Xml;
34 35
35namespace OpenSim.Region.Capabilities 36namespace OpenSim.Region.Capabilities
36{ 37{
@@ -53,7 +54,8 @@ namespace OpenSim.Region.Capabilities
53 //string requestBody = streamReader.ReadToEnd(); 54 //string requestBody = streamReader.ReadToEnd();
54 //streamReader.Close(); 55 //streamReader.Close();
55 56
56 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request); 57 libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)
58 libsecondlife.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request));
57 TRequest llsdRequest = new TRequest(); 59 TRequest llsdRequest = new TRequest();
58 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); 60 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
59 61
@@ -64,4 +66,4 @@ namespace OpenSim.Region.Capabilities
64 return encoding.GetBytes(LLSDHelpers.SerialiseLLSDReply(response)); 66 return encoding.GetBytes(LLSDHelpers.SerialiseLLSDReply(response));
65 } 67 }
66 } 68 }
67} \ No newline at end of file 69}