diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs index 0f3f48eca0..1f4a8c9044 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs @@ -64,22 +64,7 @@ namespace OpenSim.Capabilities.Handlers public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { //m_log.DebugFormat("[XXX]: FetchInventoryDescendentsRequest in {0}, {1}", (m_Scene == null) ? "none" : m_Scene.Name, request); - - // nasty temporary hack here, the linden client falsely - // identifies the uuid 00000000-0000-0000-0000-000000000000 - // as a string which breaks us - // - // correctly mark it as a uuid - // - request = request.Replace("00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000000"); - - // another hack 1 results in a - // System.ArgumentException: Object type System.Int32 cannot - // be converted to target type: System.Boolean - // - request = request.Replace("fetch_folders0", "fetch_folders0"); - request = request.Replace("fetch_folders1", "fetch_folders1"); - + Hashtable hash = new Hashtable(); try { diff --git a/OpenSim/Capabilities/LLSDHelpers.cs b/OpenSim/Capabilities/LLSDHelpers.cs index d5822675ae..e331cfba3d 100644 --- a/OpenSim/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Capabilities/LLSDHelpers.cs @@ -30,6 +30,7 @@ using System.Collections; using System.IO; using System.Reflection; using System.Xml; +using OpenMetaverse; namespace OpenSim.Framework.Capabilities { @@ -160,7 +161,18 @@ namespace OpenSim.Framework.Capabilities else if(enumerator.Value is Boolean && field.FieldType == typeof(int) ) { int i = (bool)enumerator.Value ? 1 : 0; - field.SetValue(obj, (object)i); + field.SetValue(obj, i); + } + else if(field.FieldType == typeof(bool) && enumerator.Value is int) + { + bool b = (int)enumerator.Value != 0; + field.SetValue(obj, b); + } + else if(field.FieldType == typeof(UUID) && enumerator.Value is string) + { + UUID u; + UUID.TryParse((string)enumerator.Value, out u); + field.SetValue(obj, u); } else {