aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs
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/Server/Handlers/GridUser/GridUserServerPostHandler.cs
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 'OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs')
-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}