diff options
author | Oren Hurvitz | 2014-06-01 17:39:11 +0300 |
---|---|---|
committer | Justin Clark-Casey | 2014-08-02 00:55:57 +0100 |
commit | e41e52e09727842d990a31e2a5f7f3e9c88fe8b3 (patch) | |
tree | 5779c9f42cd913f63e2d237b5a407214933585db /OpenSim/Server/Handlers/Presence | |
parent | Add code to GridService to check for overlapping of varregions (diff) | |
download | opensim-SC_OLD-e41e52e09727842d990a31e2a5f7f3e9c88fe8b3.zip opensim-SC_OLD-e41e52e09727842d990a31e2a5f7f3e9c88fe8b3.tar.gz opensim-SC_OLD-e41e52e09727842d990a31e2a5f7f3e9c88fe8b3.tar.bz2 opensim-SC_OLD-e41e52e09727842d990a31e2a5f7f3e9c88fe8b3.tar.xz |
Close streams immediately when we finish using them
Diffstat (limited to 'OpenSim/Server/Handlers/Presence')
-rw-r--r-- | OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs index 0b3b961..49dbcb5 100644 --- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | |||
@@ -265,7 +265,7 @@ namespace OpenSim.Server.Handlers.Presence | |||
265 | 265 | ||
266 | rootElement.AppendChild(result); | 266 | rootElement.AppendChild(result); |
267 | 267 | ||
268 | return DocToBytes(doc); | 268 | return Util.DocToBytes(doc); |
269 | } | 269 | } |
270 | 270 | ||
271 | private byte[] FailureResult() | 271 | private byte[] FailureResult() |
@@ -287,18 +287,7 @@ namespace OpenSim.Server.Handlers.Presence | |||
287 | 287 | ||
288 | rootElement.AppendChild(result); | 288 | rootElement.AppendChild(result); |
289 | 289 | ||
290 | return DocToBytes(doc); | 290 | return Util.DocToBytes(doc); |
291 | } | ||
292 | |||
293 | private byte[] DocToBytes(XmlDocument doc) | ||
294 | { | ||
295 | MemoryStream ms = new MemoryStream(); | ||
296 | XmlTextWriter xw = new XmlTextWriter(ms, null); | ||
297 | xw.Formatting = Formatting.Indented; | ||
298 | doc.WriteTo(xw); | ||
299 | xw.Flush(); | ||
300 | |||
301 | return ms.ToArray(); | ||
302 | } | 291 | } |
303 | 292 | ||
304 | } | 293 | } |