aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs b/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs
index 6731923..d36f9a4 100644
--- a/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs
+++ b/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -100,7 +100,7 @@ namespace OpenSim.OfflineIM
100 return false; 100 return false;
101 } 101 }
102 102
103 string imXml = string.Empty; 103 string imXml;
104 using (MemoryStream mstream = new MemoryStream()) 104 using (MemoryStream mstream = new MemoryStream())
105 { 105 {
106 XmlWriterSettings settings = new XmlWriterSettings(); 106 XmlWriterSettings settings = new XmlWriterSettings();
@@ -110,13 +110,9 @@ namespace OpenSim.OfflineIM
110 { 110 {
111 m_serializer.Serialize(writer, im); 111 m_serializer.Serialize(writer, im);
112 writer.Flush(); 112 writer.Flush();
113
114 mstream.Position = 0;
115 using (StreamReader sreader = new StreamReader(mstream))
116 {
117 imXml = sreader.ReadToEnd();
118 }
119 } 113 }
114
115 imXml = Util.UTF8.GetString(mstream.ToArray());
120 } 116 }
121 117
122 OfflineIMData data = new OfflineIMData(); 118 OfflineIMData data = new OfflineIMData();