From 70e55205a19ca83aa2f63c2b2c5d2c300e2324f6 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 15 Mar 2008 11:48:27 +0000 Subject: Part 1 of making inventory work again in the 1.19.1 (RC) client. Implemented the FetchInventoryDescendents CAPS handler. But currently returning empty folder details. So this commit doesn't actually fix inventory in that client, it just stops the "loading" message being displayed forever next to a folder, and instead shows empty folders. Next part will be to fill in the details of the items in the folders. --- OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs') diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs index 28f838d..193927d 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs @@ -66,14 +66,18 @@ namespace OpenSim.Region.Capabilities if (fieldAttributes.Length > 0) { writer.WriteStartElement(String.Empty, "key", String.Empty); - writer.WriteString(fields[i].Name); + string fieldName = fields[i].Name; + fieldName = fieldName.Replace("___", "-"); + writer.WriteString(fieldName); writer.WriteEndElement(); SerializeLLSDType(writer, fieldValue); } else { writer.WriteStartElement(String.Empty, "key", String.Empty); - writer.WriteString(fields[i].Name); + string fieldName = fields[i].Name; + fieldName = fieldName.Replace("___", "-"); + writer.WriteString(fieldName); writer.WriteEndElement(); LLSD.LLSDWriteOne(writer, fieldValue); // libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( @@ -118,7 +122,9 @@ namespace OpenSim.Region.Capabilities IDictionaryEnumerator enumerator = llsd.GetEnumerator(); while (enumerator.MoveNext()) { - FieldInfo field = myType.GetField((string) enumerator.Key); + string keyName = (string)enumerator.Key; + keyName = keyName.Replace("-","_"); + FieldInfo field = myType.GetField(keyName); if (field != null) { // if (enumerator.Value is libsecondlife.StructuredData.LLSDMap) -- cgit v1.1