diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 15 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | 16 |
2 files changed, 4 insertions, 27 deletions
diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index dda4756..d5a9d67 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | |||
@@ -602,7 +602,7 @@ namespace OpenSim.Server.Handlers.Grid | |||
602 | 602 | ||
603 | rootElement.AppendChild(result); | 603 | rootElement.AppendChild(result); |
604 | 604 | ||
605 | return DocToBytes(doc); | 605 | return Util.DocToBytes(doc); |
606 | } | 606 | } |
607 | 607 | ||
608 | private byte[] FailureResult() | 608 | private byte[] FailureResult() |
@@ -634,18 +634,7 @@ namespace OpenSim.Server.Handlers.Grid | |||
634 | 634 | ||
635 | rootElement.AppendChild(message); | 635 | rootElement.AppendChild(message); |
636 | 636 | ||
637 | return DocToBytes(doc); | 637 | return Util.DocToBytes(doc); |
638 | } | ||
639 | |||
640 | private byte[] DocToBytes(XmlDocument doc) | ||
641 | { | ||
642 | MemoryStream ms = new MemoryStream(); | ||
643 | XmlTextWriter xw = new XmlTextWriter(ms, null); | ||
644 | xw.Formatting = Formatting.Indented; | ||
645 | doc.WriteTo(xw); | ||
646 | xw.Flush(); | ||
647 | |||
648 | return ms.ToArray(); | ||
649 | } | 638 | } |
650 | 639 | ||
651 | #endregion | 640 | #endregion |
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 | } |