diff options
author | Oren Hurvitz | 2014-06-01 17:39:11 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-07-21 08:30:03 +0100 |
commit | 99ac770abbe3a95887c4b10c82f3985aa878eeef (patch) | |
tree | 8c946dab083dd50a352f3861415eca43185d8d95 /OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | |
parent | Set "[Terrain]SendTerrainUpdatesByViewDistance=true" by default. (diff) | |
download | opensim-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/Grid/GridServerPostHandler.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index dda4756..d5a9d67 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | |||
@@ -602,7 +602,7 @@ namespace OpenSim.Server.Handlers.Grid | |||
602 | 602 | ||
603 | rootElement.AppendChild(result); | 603 | rootElement.AppendChild(result); |
604 | 604 | ||
605 | return DocToBytes(doc); | 605 | return Util.DocToBytes(doc); |
606 | } | 606 | } |
607 | 607 | ||
608 | private byte[] FailureResult() | 608 | private byte[] FailureResult() |
@@ -634,18 +634,7 @@ namespace OpenSim.Server.Handlers.Grid | |||
634 | 634 | ||
635 | rootElement.AppendChild(message); | 635 | rootElement.AppendChild(message); |
636 | 636 | ||
637 | return DocToBytes(doc); | 637 | return Util.DocToBytes(doc); |
638 | } | ||
639 | |||
640 | private byte[] DocToBytes(XmlDocument doc) | ||
641 | { | ||
642 | MemoryStream ms = new MemoryStream(); | ||
643 | XmlTextWriter xw = new XmlTextWriter(ms, null); | ||
644 | xw.Formatting = Formatting.Indented; | ||
645 | doc.WriteTo(xw); | ||
646 | xw.Flush(); | ||
647 | |||
648 | return ms.ToArray(); | ||
649 | } | 638 | } |
650 | 639 | ||
651 | #endregion | 640 | #endregion |