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/Grid | |
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/Grid')
-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 |