aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
diff options
context:
space:
mode:
authorOren Hurvitz2014-06-01 17:39:11 +0300
committerJustin Clark-Casey2014-08-02 00:55:57 +0100
commite41e52e09727842d990a31e2a5f7f3e9c88fe8b3 (patch)
tree5779c9f42cd913f63e2d237b5a407214933585db /OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
parentAdd code to GridService to check for overlapping of varregions (diff)
downloadopensim-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 '')
-rw-r--r--OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs15
1 files changed, 2 insertions, 13 deletions
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
index c87e022..a77d78e 100644
--- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
@@ -315,7 +315,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
315 315
316 rootElement.AppendChild(result); 316 rootElement.AppendChild(result);
317 317
318 return DocToBytes(doc); 318 return Util.DocToBytes(doc);
319 } 319 }
320 320
321 private byte[] FailureResult() 321 private byte[] FailureResult()
@@ -337,18 +337,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
337 337
338 rootElement.AppendChild(result); 338 rootElement.AppendChild(result);
339 339
340 return DocToBytes(doc); 340 return Util.DocToBytes(doc);
341 }
342
343 private byte[] DocToBytes(XmlDocument doc)
344 {
345 MemoryStream ms = new MemoryStream();
346 XmlTextWriter xw = new XmlTextWriter(ms, null);
347 xw.Formatting = Formatting.Indented;
348 doc.WriteTo(xw);
349 xw.Flush();
350
351 return ms.ToArray();
352 } 341 }
353 342
354 private byte[] ResultToBytes(Dictionary<string, object> result) 343 private byte[] ResultToBytes(Dictionary<string, object> result)