aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/LLSD.cs
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-11-03 21:44:39 +1000
committerDavid Walter Seikel2016-11-03 21:44:39 +1000
commit134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch)
tree216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Capabilities/LLSD.cs
parentMore changing to production grid. Double oops. (diff)
downloadopensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Capabilities/LLSD.cs')
-rw-r--r--OpenSim/Capabilities/LLSD.cs29
1 files changed, 17 insertions, 12 deletions
diff --git a/OpenSim/Capabilities/LLSD.cs b/OpenSim/Capabilities/LLSD.cs
index eec9e61..c59cede 100644
--- a/OpenSim/Capabilities/LLSD.cs
+++ b/OpenSim/Capabilities/LLSD.cs
@@ -68,7 +68,10 @@ namespace OpenSim.Framework.Capabilities
68 /// <returns></returns> 68 /// <returns></returns>
69 public static object LLSDDeserialize(byte[] b) 69 public static object LLSDDeserialize(byte[] b)
70 { 70 {
71 return LLSDDeserialize(new MemoryStream(b, false)); 71 using (MemoryStream ms = new MemoryStream(b, false))
72 {
73 return LLSDDeserialize(ms);
74 }
72 } 75 }
73 76
74 /// <summary> 77 /// <summary>
@@ -78,21 +81,23 @@ namespace OpenSim.Framework.Capabilities
78 /// <returns></returns> 81 /// <returns></returns>
79 public static object LLSDDeserialize(Stream st) 82 public static object LLSDDeserialize(Stream st)
80 { 83 {
81 XmlTextReader reader = new XmlTextReader(st); 84 using (XmlTextReader reader = new XmlTextReader(st))
82 reader.Read(); 85 {
83 SkipWS(reader); 86 reader.Read();
87 SkipWS(reader);
84 88
85 if (reader.NodeType != XmlNodeType.Element || reader.LocalName != "llsd") 89 if (reader.NodeType != XmlNodeType.Element || reader.LocalName != "llsd")
86 throw new LLSDParseException("Expected <llsd>"); 90 throw new LLSDParseException("Expected <llsd>");
87 91
88 reader.Read(); 92 reader.Read();
89 object ret = LLSDParseOne(reader); 93 object ret = LLSDParseOne(reader);
90 SkipWS(reader); 94 SkipWS(reader);
91 95
92 if (reader.NodeType != XmlNodeType.EndElement || reader.LocalName != "llsd") 96 if (reader.NodeType != XmlNodeType.EndElement || reader.LocalName != "llsd")
93 throw new LLSDParseException("Expected </llsd>"); 97 throw new LLSDParseException("Expected </llsd>");
94 98
95 return ret; 99 return ret;
100 }
96 } 101 }
97 102
98 /// <summary> 103 /// <summary>