diff options
Diffstat (limited to 'OpenSim/Framework/Serialization')
-rw-r--r-- | OpenSim/Framework/Serialization/External/UserProfileSerializer.cs | 8 | ||||
-rw-r--r-- | OpenSim/Framework/Serialization/TarArchiveWriter.cs | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs b/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs index fb269b7..f50b49a 100644 --- a/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs +++ b/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Framework.Serialization.External | |||
40 | public const int MAJOR_VERSION = 0; | 40 | public const int MAJOR_VERSION = 0; |
41 | public const int MINOR_VERSION = 1; | 41 | public const int MINOR_VERSION = 1; |
42 | 42 | ||
43 | public static string Serialize(UserProfileData profile) | 43 | public static string Serialize(UUID userID, string firstName, string lastName) |
44 | { | 44 | { |
45 | StringWriter sw = new StringWriter(); | 45 | StringWriter sw = new StringWriter(); |
46 | XmlTextWriter xtw = new XmlTextWriter(sw); | 46 | XmlTextWriter xtw = new XmlTextWriter(sw); |
@@ -51,9 +51,9 @@ namespace OpenSim.Framework.Serialization.External | |||
51 | xtw.WriteAttributeString("major_version", MAJOR_VERSION.ToString()); | 51 | xtw.WriteAttributeString("major_version", MAJOR_VERSION.ToString()); |
52 | xtw.WriteAttributeString("minor_version", MINOR_VERSION.ToString()); | 52 | xtw.WriteAttributeString("minor_version", MINOR_VERSION.ToString()); |
53 | 53 | ||
54 | xtw.WriteElementString("name", profile.Name); | 54 | xtw.WriteElementString("name", firstName + " " + lastName); |
55 | xtw.WriteElementString("id", profile.ID.ToString()); | 55 | xtw.WriteElementString("id", userID.ToString()); |
56 | xtw.WriteElementString("about", profile.AboutText); | 56 | xtw.WriteElementString("about", ""); |
57 | 57 | ||
58 | // Not sure if we're storing this yet, need to take a look | 58 | // Not sure if we're storing this yet, need to take a look |
59 | // xtw.WriteElementString("Url", profile.Url); | 59 | // xtw.WriteElementString("Url", profile.Url); |
diff --git a/OpenSim/Framework/Serialization/TarArchiveWriter.cs b/OpenSim/Framework/Serialization/TarArchiveWriter.cs index 20d0f7e..0bd639f 100644 --- a/OpenSim/Framework/Serialization/TarArchiveWriter.cs +++ b/OpenSim/Framework/Serialization/TarArchiveWriter.cs | |||
@@ -208,7 +208,9 @@ namespace OpenSim.Framework.Serialization | |||
208 | m_bw.Write(header); | 208 | m_bw.Write(header); |
209 | 209 | ||
210 | // Write out data | 210 | // Write out data |
211 | m_bw.Write(data); | 211 | // An IOException occurs if we try to write out an empty array in Mono 2.6 |
212 | if (data.Length > 0) | ||
213 | m_bw.Write(data); | ||
212 | 214 | ||
213 | if (data.Length % 512 != 0) | 215 | if (data.Length % 512 != 0) |
214 | { | 216 | { |