aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons
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/Addons
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/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs13
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