aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/GridUser
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/GridUser
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/GridUser')
-rw-r--r--OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs16
1 files changed, 2 insertions, 14 deletions
diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs
index 006f6ab..9237c63 100644
--- a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs
@@ -279,7 +279,7 @@ namespace OpenSim.Server.Handlers.GridUser
279 279
280 rootElement.AppendChild(result); 280 rootElement.AppendChild(result);
281 281
282 return DocToBytes(doc); 282 return Util.DocToBytes(doc);
283 } 283 }
284 284
285 private byte[] FailureResult() 285 private byte[] FailureResult()
@@ -301,20 +301,8 @@ namespace OpenSim.Server.Handlers.GridUser
301 301
302 rootElement.AppendChild(result); 302 rootElement.AppendChild(result);
303 303
304 return DocToBytes(doc); 304 return Util.DocToBytes(doc);
305 } 305 }
306 306
307 private byte[] DocToBytes(XmlDocument doc)
308 {
309 MemoryStream ms = new MemoryStream();
310 XmlTextWriter xw = new XmlTextWriter(ms, null);
311 xw.Formatting = Formatting.Indented;
312 doc.WriteTo(xw);
313 xw.Flush();
314
315 return ms.ToArray();
316 }
317
318
319 } 307 }
320} 308}