aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
diff options
context:
space:
mode:
authorOren Hurvitz2014-06-01 17:39:11 +0300
committerOren Hurvitz2014-07-21 08:30:03 +0100
commit99ac770abbe3a95887c4b10c82f3985aa878eeef (patch)
tree8c946dab083dd50a352f3861415eca43185d8d95 /OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
parentSet "[Terrain]SendTerrainUpdatesByViewDistance=true" by default. (diff)
downloadopensim-SC-99ac770abbe3a95887c4b10c82f3985aa878eeef.zip
opensim-SC-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.gz
opensim-SC-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.bz2
opensim-SC-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.xz
Close streams immediately when we finish using them
Diffstat (limited to 'OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs')
-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)