aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/Handlers/FetchInventory2
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-02 04:57:10 +0100
committerJustin Clark-Casey (justincc)2012-06-02 04:57:10 +0100
commit01a2b0b289933febc95523de02275c9bd573b10e (patch)
tree3ad8193876370cf4db30738d97c0b01f123100a8 /OpenSim/Capabilities/Handlers/FetchInventory2
parentInstead of updating sim stats root agent, child, objects and scripts accounts... (diff)
downloadopensim-SC-01a2b0b289933febc95523de02275c9bd573b10e.zip
opensim-SC-01a2b0b289933febc95523de02275c9bd573b10e.tar.gz
opensim-SC-01a2b0b289933febc95523de02275c9bd573b10e.tar.bz2
opensim-SC-01a2b0b289933febc95523de02275c9bd573b10e.tar.xz
Fix various issues with http inventory
1) The return messages were being wrongly populated with the names of asset, inventory and sale types when their corresponding integers should have been used instead. 2) Folders with links were including the linked items in the descendents figure, when only the links should be included. 3) Links and linked items in link folders were not being included in the return data, and not in the correct order. Now that these issues have been addressed, outfits and attachments appear to work consistently when HTTP inventory is enabled (as is now the default).
Diffstat (limited to 'OpenSim/Capabilities/Handlers/FetchInventory2')
-rw-r--r--OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2Handler.cs30
1 files changed, 3 insertions, 27 deletions
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2Handler.cs b/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2Handler.cs
index 717a097..c0ca1e1 100644
--- a/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2Handler.cs
+++ b/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2Handler.cs
@@ -101,18 +101,8 @@ namespace OpenSim.Capabilities.Handlers
101 llsdItem.item_id = invItem.ID; 101 llsdItem.item_id = invItem.ID;
102 llsdItem.name = invItem.Name; 102 llsdItem.name = invItem.Name;
103 llsdItem.parent_id = invItem.Folder; 103 llsdItem.parent_id = invItem.Folder;
104 104 llsdItem.type = invItem.AssetType;
105 try 105 llsdItem.inv_type = invItem.InvType;
106 {
107 llsdItem.type = Utils.AssetTypeToString((AssetType)invItem.AssetType);
108 llsdItem.inv_type = Utils.InventoryTypeToString((InventoryType)invItem.InvType);
109 }
110 catch (Exception e)
111 {
112 m_log.ErrorFormat(
113 "[WEB FETCH INV DESC HANDLER]: Problem setting asset {0} inventory {1} types while converting inventory item {2}: {3}",
114 invItem.AssetType, invItem.InvType, invItem.Name, e.Message);
115 }
116 106
117 llsdItem.permissions = new LLSDPermissions(); 107 llsdItem.permissions = new LLSDPermissions();
118 llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid; 108 llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid;
@@ -126,21 +116,7 @@ namespace OpenSim.Capabilities.Handlers
126 llsdItem.permissions.owner_mask = (int)invItem.CurrentPermissions; 116 llsdItem.permissions.owner_mask = (int)invItem.CurrentPermissions;
127 llsdItem.sale_info = new LLSDSaleInfo(); 117 llsdItem.sale_info = new LLSDSaleInfo();
128 llsdItem.sale_info.sale_price = invItem.SalePrice; 118 llsdItem.sale_info.sale_price = invItem.SalePrice;
129 switch (invItem.SaleType) 119 llsdItem.sale_info.sale_type = invItem.SaleType;
130 {
131 default:
132 llsdItem.sale_info.sale_type = "not";
133 break;
134 case 1:
135 llsdItem.sale_info.sale_type = "original";
136 break;
137 case 2:
138 llsdItem.sale_info.sale_type = "copy";
139 break;
140 case 3:
141 llsdItem.sale_info.sale_type = "contents";
142 break;
143 }
144 120
145 return llsdItem; 121 return llsdItem;
146 } 122 }