diff options
-rw-r--r-- | OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | 2 |
2 files changed, 17 insertions, 8 deletions
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs index 6fd7946..17dbcd5 100644 --- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | |||
@@ -60,6 +60,8 @@ namespace OpenSim.Capabilities.Handlers | |||
60 | 60 | ||
61 | public string FetchInventoryDescendentsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 61 | public string FetchInventoryDescendentsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
62 | { | 62 | { |
63 | // m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Received request"); | ||
64 | |||
63 | // nasty temporary hack here, the linden client falsely | 65 | // nasty temporary hack here, the linden client falsely |
64 | // identifies the uuid 00000000-0000-0000-0000-000000000000 | 66 | // identifies the uuid 00000000-0000-0000-0000-000000000000 |
65 | // as a string which breaks us | 67 | // as a string which breaks us |
@@ -155,7 +157,10 @@ namespace OpenSim.Capabilities.Handlers | |||
155 | inv.Items = new List<InventoryItemBase>(); | 157 | inv.Items = new List<InventoryItemBase>(); |
156 | int version = 0; | 158 | int version = 0; |
157 | 159 | ||
158 | inv = Fetch(invFetch.owner_id, invFetch.folder_id, invFetch.owner_id, invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order, out version); | 160 | inv |
161 | = Fetch( | ||
162 | invFetch.owner_id, invFetch.folder_id, invFetch.owner_id, | ||
163 | invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order, out version); | ||
159 | 164 | ||
160 | if (inv.Folders != null) | 165 | if (inv.Folders != null) |
161 | { | 166 | { |
@@ -183,7 +188,7 @@ namespace OpenSim.Capabilities.Handlers | |||
183 | bool fetchFolders, bool fetchItems, int sortOrder, out int version) | 188 | bool fetchFolders, bool fetchItems, int sortOrder, out int version) |
184 | { | 189 | { |
185 | m_log.DebugFormat( | 190 | m_log.DebugFormat( |
186 | "[WEBFETCHINVENTORYDESCENDANTS]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", | 191 | "[WEB FETCH INV DESC HANDLER]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", |
187 | fetchFolders, fetchItems, folderID, agentID); | 192 | fetchFolders, fetchItems, folderID, agentID); |
188 | 193 | ||
189 | version = 0; | 194 | version = 0; |
@@ -254,16 +259,19 @@ namespace OpenSim.Capabilities.Handlers | |||
254 | llsdItem.item_id = invItem.ID; | 259 | llsdItem.item_id = invItem.ID; |
255 | llsdItem.name = invItem.Name; | 260 | llsdItem.name = invItem.Name; |
256 | llsdItem.parent_id = invItem.Folder; | 261 | llsdItem.parent_id = invItem.Folder; |
262 | |||
257 | try | 263 | try |
258 | { | 264 | { |
259 | // TODO reevaluate after upgrade to libomv >= r2566. Probably should use UtilsConversions. | 265 | llsdItem.type = Utils.AssetTypeToString((AssetType)invItem.AssetType); |
260 | llsdItem.type = TaskInventoryItem.Types[invItem.AssetType]; | 266 | llsdItem.inv_type = Utils.InventoryTypeToString((InventoryType)invItem.InvType); |
261 | llsdItem.inv_type = TaskInventoryItem.InvTypes[invItem.InvType]; | ||
262 | } | 267 | } |
263 | catch (Exception e) | 268 | catch (Exception e) |
264 | { | 269 | { |
265 | m_log.ErrorFormat("[CAPS]: Problem setting asset {0} inventory {1} types while converting inventory item {2}: {3}", invItem.AssetType, invItem.InvType, invItem.Name, e.Message); | 270 | m_log.ErrorFormat( |
271 | "[WEB FETCH INV DESC HANDLER]: Problem setting asset {0} inventory {1} types while converting inventory item {2}: {3}", | ||
272 | invItem.AssetType, invItem.InvType, invItem.Name, e.Message); | ||
266 | } | 273 | } |
274 | |||
267 | llsdItem.permissions = new LLSDPermissions(); | 275 | llsdItem.permissions = new LLSDPermissions(); |
268 | llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid; | 276 | llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid; |
269 | llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; | 277 | llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; |
@@ -294,6 +302,5 @@ namespace OpenSim.Capabilities.Handlers | |||
294 | 302 | ||
295 | return llsdItem; | 303 | return llsdItem; |
296 | } | 304 | } |
297 | |||
298 | } | 305 | } |
299 | } | 306 | } \ No newline at end of file |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 94629a2..1c1d83c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | |||
@@ -122,11 +122,13 @@ namespace OpenSim.Region.ClientStack.Linden | |||
122 | WebFetchInvDescHandler webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); | 122 | WebFetchInvDescHandler webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); |
123 | IRequestHandler reqHandler = new RestStreamHandler("POST", "/CAPS/" + UUID.Random(), webFetchHandler.FetchInventoryDescendentsRequest); | 123 | IRequestHandler reqHandler = new RestStreamHandler("POST", "/CAPS/" + UUID.Random(), webFetchHandler.FetchInventoryDescendentsRequest); |
124 | caps.RegisterHandler("WebFetchInventoryDescendents", reqHandler); | 124 | caps.RegisterHandler("WebFetchInventoryDescendents", reqHandler); |
125 | // caps.RegisterHandler("FetchInventoryDescendents2", reqHandler); | ||
125 | } | 126 | } |
126 | else | 127 | else |
127 | { | 128 | { |
128 | m_log.InfoFormat("[WEBFETCHINVENTORYDESCENDANTS]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName); | 129 | m_log.InfoFormat("[WEBFETCHINVENTORYDESCENDANTS]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName); |
129 | caps.RegisterHandler("WebFetchInventoryDescendents", m_URL); | 130 | caps.RegisterHandler("WebFetchInventoryDescendents", m_URL); |
131 | // caps.RegisterHandler("FetchInventoryDescendents2", m_URL); | ||
130 | } | 132 | } |
131 | } | 133 | } |
132 | 134 | ||