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/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs | |
parent | Set "[Terrain]SendTerrainUpdatesByViewDistance=true" by default. (diff) | |
download | opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.zip opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.gz opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.bz2 opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.xz |
Close streams immediately when we finish using them
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs b/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs index c44b6cc..b3673da 100644 --- a/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs +++ b/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs | |||
@@ -215,18 +215,7 @@ namespace OpenSim.OfflineIM | |||
215 | 215 | ||
216 | rootElement.AppendChild(result); | 216 | rootElement.AppendChild(result); |
217 | 217 | ||
218 | return DocToBytes(doc); | 218 | return Util.DocToBytes(doc); |
219 | } | ||
220 | |||
221 | private byte[] DocToBytes(XmlDocument doc) | ||
222 | { | ||
223 | MemoryStream ms = new MemoryStream(); | ||
224 | XmlTextWriter xw = new XmlTextWriter(ms, null); | ||
225 | xw.Formatting = Formatting.Indented; | ||
226 | doc.WriteTo(xw); | ||
227 | xw.Flush(); | ||
228 | |||
229 | return ms.ToArray(); | ||
230 | } | 219 | } |
231 | 220 | ||
232 | #endregion | 221 | #endregion |