diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs index 6fd79469a4..17dbcd5c7d 100644 --- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs @@ -60,6 +60,8 @@ namespace OpenSim.Capabilities.Handlers public string FetchInventoryDescendentsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { +// m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Received request"); + // nasty temporary hack here, the linden client falsely // identifies the uuid 00000000-0000-0000-0000-000000000000 // as a string which breaks us @@ -155,7 +157,10 @@ namespace OpenSim.Capabilities.Handlers inv.Items = new List(); int version = 0; - inv = Fetch(invFetch.owner_id, invFetch.folder_id, invFetch.owner_id, invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order, out version); + inv + = Fetch( + invFetch.owner_id, invFetch.folder_id, invFetch.owner_id, + invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order, out version); if (inv.Folders != null) { @@ -183,7 +188,7 @@ namespace OpenSim.Capabilities.Handlers bool fetchFolders, bool fetchItems, int sortOrder, out int version) { m_log.DebugFormat( - "[WEBFETCHINVENTORYDESCENDANTS]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", + "[WEB FETCH INV DESC HANDLER]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", fetchFolders, fetchItems, folderID, agentID); version = 0; @@ -254,16 +259,19 @@ namespace OpenSim.Capabilities.Handlers llsdItem.item_id = invItem.ID; llsdItem.name = invItem.Name; llsdItem.parent_id = invItem.Folder; + try { - // TODO reevaluate after upgrade to libomv >= r2566. Probably should use UtilsConversions. - llsdItem.type = TaskInventoryItem.Types[invItem.AssetType]; - llsdItem.inv_type = TaskInventoryItem.InvTypes[invItem.InvType]; + llsdItem.type = Utils.AssetTypeToString((AssetType)invItem.AssetType); + llsdItem.inv_type = Utils.InventoryTypeToString((InventoryType)invItem.InvType); } catch (Exception e) { - 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); + m_log.ErrorFormat( + "[WEB FETCH INV DESC HANDLER]: Problem setting asset {0} inventory {1} types while converting inventory item {2}: {3}", + invItem.AssetType, invItem.InvType, invItem.Name, e.Message); } + llsdItem.permissions = new LLSDPermissions(); llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid; llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; @@ -294,6 +302,5 @@ namespace OpenSim.Capabilities.Handlers return llsdItem; } - } -} +} \ 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 94629a2ee9..1c1d83ca23 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 WebFetchInvDescHandler webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); IRequestHandler reqHandler = new RestStreamHandler("POST", "/CAPS/" + UUID.Random(), webFetchHandler.FetchInventoryDescendentsRequest); caps.RegisterHandler("WebFetchInventoryDescendents", reqHandler); +// caps.RegisterHandler("FetchInventoryDescendents2", reqHandler); } else { m_log.InfoFormat("[WEBFETCHINVENTORYDESCENDANTS]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName); caps.RegisterHandler("WebFetchInventoryDescendents", m_URL); +// caps.RegisterHandler("FetchInventoryDescendents2", m_URL); } }