aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs25
1 files changed, 19 insertions, 6 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index 4211c20..00de14d 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -29,7 +29,9 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.IO; 31using System.IO;
32
32using libsecondlife; 33using libsecondlife;
34
33using OpenSim.Framework; 35using OpenSim.Framework;
34using OpenSim.Framework.Communications.Cache; 36using OpenSim.Framework.Communications.Cache;
35using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
@@ -213,20 +215,20 @@ namespace OpenSim.Region.Capabilities
213 public string FetchInventoryRequest(string request, string path, string param) 215 public string FetchInventoryRequest(string request, string path, string param)
214 { 216 {
215 string unmodifiedRequest = request.ToString(); 217 string unmodifiedRequest = request.ToString();
216 218
219 //m_log.DebugFormat("[AGENT INVENTORY]: Received CAPS fetch inventory request {0}", unmodifiedRequest);
217 220
218 Hashtable hash = new Hashtable(); 221 Hashtable hash = new Hashtable();
219 try 222 try
220 { 223 {
221
222 hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); 224 hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request));
223 } 225 }
224 catch (LLSD.LLSDParseException pe) 226 catch (LLSD.LLSDParseException pe)
225 { 227 {
226 m_log.Error("[INVENTORY]: Fetch error: " + pe.Message); 228 m_log.Error("[AGENT INVENTORY]: Fetch error: " + pe.Message);
227 m_log.Error("Request:" + request.ToString()); 229 m_log.Error("Request: " + request.ToString());
228 } 230 }
229 //LLSDArray llsdFolderRequest = LLSDHelpers. 231
230 ArrayList foldersrequested = (ArrayList)hash["folders"]; 232 ArrayList foldersrequested = (ArrayList)hash["folders"];
231 233
232 string response = ""; 234 string response = "";
@@ -258,6 +260,8 @@ namespace OpenSim.Region.Capabilities
258 response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>"; 260 response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>";
259 } 261 }
260 262
263 //m_log.DebugFormat("[AGENT INVENTORY]: Replying to CAPS fetch inventory request {0}", response);
264
261 return response; 265 return response;
262 } 266 }
263 267
@@ -297,7 +301,16 @@ namespace OpenSim.Region.Capabilities
297 llsdItem.item_id = invItem.inventoryID; 301 llsdItem.item_id = invItem.inventoryID;
298 llsdItem.name = invItem.inventoryName; 302 llsdItem.name = invItem.inventoryName;
299 llsdItem.parent_id = invItem.parentFolderID; 303 llsdItem.parent_id = invItem.parentFolderID;
300 llsdItem.type = Enum.GetName(typeof(AssetType), invItem.assetType).ToLower(); 304 llsdItem.type = Enum.GetName(typeof(AssetType), invItem.assetType).ToLower();
305
306 // XXX Temporary fix for 'objects not appearing in inventory' problem. The asset type from libsecondlife is
307 // returning "primitive" when it should returning "object"! It looks like this is fixed in the latest libsecondlife,
308 // but our own libsl1550 doesn't have it either!
309 if ("primitive".Equals(llsdItem.type))
310 {
311 llsdItem.type = "object";
312 }
313
301 llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.invType).ToLower(); 314 llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.invType).ToLower();
302 llsdItem.permissions = new LLSDPermissions(); 315 llsdItem.permissions = new LLSDPermissions();
303 llsdItem.permissions.creator_id = invItem.creatorsID; 316 llsdItem.permissions.creator_id = invItem.creatorsID;