From 90422db35a9540a5eabfca0ede239d7efc36c83e Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 8 Apr 2008 14:39:29 +0000 Subject: * Update code to use patched libsecondlife.dll which removes the problem where the AssetType enum was 'Primitive' rather than 'Object' * The libsecondlife patch was also applied to libsecondlife itself in r1714 * Many, many thanks to Dr Schofield (IBM) for his help on this :) --- OpenSim/Framework/Communications/Capabilities/Caps.cs | 11 +---------- OpenSim/Framework/Communications/InventoryServiceBase.cs | 2 +- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 315daab..36bebe8 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -301,16 +301,7 @@ namespace OpenSim.Region.Capabilities llsdItem.item_id = invItem.ID; llsdItem.name = invItem.Name; llsdItem.parent_id = invItem.Folder; - llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower(); - - // XXX Temporary fix for 'objects not appearing in inventory' problem. The asset type from libsecondlife is - // returning "primitive" when it should returning "object"! It looks like this is fixed in the latest libsecondlife, - // but our own libsl1550 doesn't have it either! - if ("primitive".Equals(llsdItem.type)) - { - llsdItem.type = "object"; - } - + llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower(); llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower(); llsdItem.permissions = new LLSDPermissions(); llsdItem.permissions.creator_id = invItem.Creator; diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index 4abfc5a..1250f53 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -326,7 +326,7 @@ namespace OpenSim.Framework.Communications folder.AgentID = user; folder.ID = LLUUID.Random(); folder.Name = "Objects"; - folder.Type = (short)AssetType.Primitive; + folder.Type = (short)AssetType.Object; folder.Version = 1; Folders.Add(folder.ID, folder); diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 87f7ace..bc8fb59 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -858,7 +858,7 @@ namespace OpenSim.Region.Environment.Scenes ((SceneObjectGroup) selectedEnt).GetPartName(selectedEnt.LocalId), ((SceneObjectGroup) selectedEnt).GetPartDescription(selectedEnt.LocalId), (sbyte) InventoryType.Object, - (sbyte) AssetType.Primitive, + (sbyte) AssetType.Object, Helpers.StringToField(sceneObjectXml)); AssetCache.AddAsset(asset); -- cgit v1.1