aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.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/Avatar/AvatarServerPostHandler.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/Avatar/AvatarServerPostHandler.cs')
-rw-r--r--OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs15
1 files changed, 2 insertions, 13 deletions
diff --git a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
index 59dbed4..ff8699f 100644
--- a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
@@ -247,7 +247,7 @@ namespace OpenSim.Server.Handlers.Avatar
247 247
248 rootElement.AppendChild(result); 248 rootElement.AppendChild(result);
249 249
250 return DocToBytes(doc); 250 return Util.DocToBytes(doc);
251 } 251 }
252 252
253 private byte[] FailureResult() 253 private byte[] FailureResult()
@@ -269,18 +269,7 @@ namespace OpenSim.Server.Handlers.Avatar
269 269
270 rootElement.AppendChild(result); 270 rootElement.AppendChild(result);
271 271
272 return DocToBytes(doc); 272 return Util.DocToBytes(doc);
273 }
274
275 private byte[] DocToBytes(XmlDocument doc)
276 {
277 MemoryStream ms = new MemoryStream();
278 XmlTextWriter xw = new XmlTextWriter(ms, null);
279 xw.Formatting = Formatting.Indented;
280 doc.WriteTo(xw);
281 xw.Flush();
282
283 return ms.ToArray();
284 } 273 }
285 274
286 } 275 }