aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs17
-rw-r--r--OpenSim/Capabilities/LLSDHelpers.cs14
2 files changed, 14 insertions, 17 deletions
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs
index 0f3f48e..1f4a8c9 100644
--- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs
@@ -64,22 +64,7 @@ namespace OpenSim.Capabilities.Handlers
64 public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 64 public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
65 { 65 {
66 //m_log.DebugFormat("[XXX]: FetchInventoryDescendentsRequest in {0}, {1}", (m_Scene == null) ? "none" : m_Scene.Name, request); 66 //m_log.DebugFormat("[XXX]: FetchInventoryDescendentsRequest in {0}, {1}", (m_Scene == null) ? "none" : m_Scene.Name, request);
67 67
68 // nasty temporary hack here, the linden client falsely
69 // identifies the uuid 00000000-0000-0000-0000-000000000000
70 // as a string which breaks us
71 //
72 // correctly mark it as a uuid
73 //
74 request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>");
75
76 // another hack <integer>1</integer> results in a
77 // System.ArgumentException: Object type System.Int32 cannot
78 // be converted to target type: System.Boolean
79 //
80 request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>");
81 request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>");
82
83 Hashtable hash = new Hashtable(); 68 Hashtable hash = new Hashtable();
84 try 69 try
85 { 70 {
diff --git a/OpenSim/Capabilities/LLSDHelpers.cs b/OpenSim/Capabilities/LLSDHelpers.cs
index d582267..e331cfb 100644
--- a/OpenSim/Capabilities/LLSDHelpers.cs
+++ b/OpenSim/Capabilities/LLSDHelpers.cs
@@ -30,6 +30,7 @@ using System.Collections;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Xml; 32using System.Xml;
33using OpenMetaverse;
33 34
34namespace OpenSim.Framework.Capabilities 35namespace OpenSim.Framework.Capabilities
35{ 36{
@@ -160,7 +161,18 @@ namespace OpenSim.Framework.Capabilities
160 else if(enumerator.Value is Boolean && field.FieldType == typeof(int) ) 161 else if(enumerator.Value is Boolean && field.FieldType == typeof(int) )
161 { 162 {
162 int i = (bool)enumerator.Value ? 1 : 0; 163 int i = (bool)enumerator.Value ? 1 : 0;
163 field.SetValue(obj, (object)i); 164 field.SetValue(obj, i);
165 }
166 else if(field.FieldType == typeof(bool) && enumerator.Value is int)
167 {
168 bool b = (int)enumerator.Value != 0;
169 field.SetValue(obj, b);
170 }
171 else if(field.FieldType == typeof(UUID) && enumerator.Value is string)
172 {
173 UUID u;
174 UUID.TryParse((string)enumerator.Value, out u);
175 field.SetValue(obj, u);
164 } 176 }
165 else 177 else
166 { 178 {