aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.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/Server/Handlers/Presence/PresenceServerPostHandler.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/Server/Handlers/Presence/PresenceServerPostHandler.cs')
-rw-r--r--OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs15
1 files changed, 2 insertions, 13 deletions
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
index 0b3b961..49dbcb5 100644
--- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
@@ -265,7 +265,7 @@ namespace OpenSim.Server.Handlers.Presence
265 265
266 rootElement.AppendChild(result); 266 rootElement.AppendChild(result);
267 267
268 return DocToBytes(doc); 268 return Util.DocToBytes(doc);
269 } 269 }
270 270
271 private byte[] FailureResult() 271 private byte[] FailureResult()
@@ -287,18 +287,7 @@ namespace OpenSim.Server.Handlers.Presence
287 287
288 rootElement.AppendChild(result); 288 rootElement.AppendChild(result);
289 289
290 return DocToBytes(doc); 290 return Util.DocToBytes(doc);
291 }
292
293 private byte[] DocToBytes(XmlDocument doc)
294 {
295 MemoryStream ms = new MemoryStream();
296 XmlTextWriter xw = new XmlTextWriter(ms, null);
297 xw.Formatting = Formatting.Indented;
298 doc.WriteTo(xw);
299 xw.Flush();
300
301 return ms.ToArray();
302 } 291 }
303 292
304 } 293 }