diff options
author | Homer Horwitz | 2009-05-09 21:11:12 +0000 |
---|---|---|
committer | Homer Horwitz | 2009-05-09 21:11:12 +0000 |
commit | 1d234ca83f64b31b559ace3f63ebbba9f4903778 (patch) | |
tree | 887ba461d3ff20432806672786cbb82ff39b9aa4 /OpenSim/Framework | |
parent | * Code to make MRM debugging easier. (diff) | |
download | opensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.zip opensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.tar.gz opensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.tar.bz2 opensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.tar.xz |
Fixed handling of inventory a bit
- AssetType isn't InventoryType. Those enums contain different numbers. Use AssetType for the asset type, InventoryType for the inventory type.
- The ToString method (or ToLower) of AssetType/InventoryType doesn't necessarily return the correct LLSD string.
- Replaced several magic numbers by their corresponding enum.
- Fixed the invType for gestures and animations in the library.
This should fix Mantis #3610 and the non-terminating inventory loading
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Capabilities/Caps.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 5809455..6e005b7 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -365,7 +365,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
365 | 365 | ||
366 | public string FetchInventoryDescendentsRequest(string request, string path, string param,OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 366 | public string FetchInventoryDescendentsRequest(string request, string path, string param,OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
367 | { | 367 | { |
368 | m_log.Debug("[CAPS]: FetchInventoryDescendentsRequest in region: " + m_regionName + "request is "+request); | 368 | m_log.Debug("[CAPS]: FetchInventoryDescendentsRequest in region: " + m_regionName + " request is "+request); |
369 | 369 | ||
370 | // nasty temporary hack here, the linden client falsely identifies the uuid 00000000-0000-0000-0000-000000000000 as a string which breaks us | 370 | // nasty temporary hack here, the linden client falsely identifies the uuid 00000000-0000-0000-0000-000000000000 as a string which breaks us |
371 | // correctly mark it as a uuid | 371 | // correctly mark it as a uuid |
@@ -512,8 +512,16 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
512 | llsdItem.item_id = invItem.ID; | 512 | llsdItem.item_id = invItem.ID; |
513 | llsdItem.name = invItem.Name; | 513 | llsdItem.name = invItem.Name; |
514 | llsdItem.parent_id = invItem.Folder; | 514 | llsdItem.parent_id = invItem.Folder; |
515 | llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower(); | 515 | try |
516 | llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower(); | 516 | { |
517 | // TODO reevaluate after upgrade to libomv >= r2566. Probably should use UtilsConversions. | ||
518 | llsdItem.type = TaskInventoryItem.Types[invItem.AssetType]; | ||
519 | llsdItem.inv_type = TaskInventoryItem.InvTypes[invItem.InvType]; | ||
520 | } | ||
521 | catch (Exception e) | ||
522 | { | ||
523 | m_log.Error("[CAPS]: Problem setting asset/inventory type while converting inventory item " + invItem.Name + " to LLSD:", e); | ||
524 | } | ||
517 | llsdItem.permissions = new LLSDPermissions(); | 525 | llsdItem.permissions = new LLSDPermissions(); |
518 | llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid; | 526 | llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid; |
519 | llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; | 527 | llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; |