diff options
author | Justin Clarke Casey | 2008-04-04 17:43:29 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-04-04 17:43:29 +0000 |
commit | f5ed6357505953a28dd281a2bd9a4e497df7af7b (patch) | |
tree | c71dfe57bf00ebb63c251bf7cb641bca06dadda9 | |
parent | * Removing debugging goo for mantis 854 since the fix is reported to work. (diff) | |
download | opensim-SC_OLD-f5ed6357505953a28dd281a2bd9a4e497df7af7b.zip opensim-SC_OLD-f5ed6357505953a28dd281a2bd9a4e497df7af7b.tar.gz opensim-SC_OLD-f5ed6357505953a28dd281a2bd9a4e497df7af7b.tar.bz2 opensim-SC_OLD-f5ed6357505953a28dd281a2bd9a4e497df7af7b.tar.xz |
* Make objects appear in 1.19.1.4 inventory again
* You will probably need to clear your client's cache before this will take effect
* The problem was that the underlying libsecondlife.AssetType was returning "primitive" rather than "object". This fix is in lieu of correcting/updating our libsecondlife.dll
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Capabilities/Caps.cs | 25 |
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; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.IO; | 31 | using System.IO; |
32 | |||
32 | using libsecondlife; | 33 | using libsecondlife; |
34 | |||
33 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Communications.Cache; | 36 | using OpenSim.Framework.Communications.Cache; |
35 | using OpenSim.Framework.Console; | 37 | using 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; |