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