aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/Handlers/FetchInventory2
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2Handler.cs30
-rw-r--r--OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2ServerConnector.cs3
2 files changed, 5 insertions, 28 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 }
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2ServerConnector.cs b/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2ServerConnector.cs
index 0ba8931..5bab52f 100644
--- a/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2ServerConnector.cs
+++ b/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2ServerConnector.cs
@@ -63,7 +63,8 @@ namespace OpenSim.Capabilities.Handlers
63 63
64 FetchInventory2Handler fiHandler = new FetchInventory2Handler(m_InventoryService); 64 FetchInventory2Handler fiHandler = new FetchInventory2Handler(m_InventoryService);
65 IRequestHandler reqHandler 65 IRequestHandler reqHandler
66 = new RestStreamHandler("POST", "/CAPS/FetchInventory/", fiHandler.FetchInventoryRequest); 66 = new RestStreamHandler(
67 "POST", "/CAPS/FetchInventory/", fiHandler.FetchInventoryRequest, "FetchInventory", null);
67 server.AddStreamHandler(reqHandler); 68 server.AddStreamHandler(reqHandler);
68 } 69 }
69 } 70 }