From 16aaba77d49baad0dc581ffbf69d71181b9be70f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 6 Dec 2013 00:30:44 +0000 Subject: Properly set InventoryType.Snapshot when a snapshot is uploaded Resolves http://opensimulator.org/mantis/view.php?id=6857 This prevents the inventory service complaining later about an attempt to change an invariant --- OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 1d4c7f0..66d2138 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -501,6 +501,10 @@ namespace OpenSim.Region.ClientStack.Linden inType = 1; assType = 1; } + else if (inventoryType == "snapshot") + { + inType = (sbyte)InventoryType.Snapshot; + } else if (inventoryType == "animation") { inType = 19; -- cgit v1.1 From bb4f4d9480df4c17ea31288c069993305c7e1582 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 6 Dec 2013 00:38:18 +0000 Subject: minor: Use enums for setting inv/asset types on data upload rather than magic numbers --- .../ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 66d2138..a4fe81c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -498,8 +498,8 @@ namespace OpenSim.Region.ClientStack.Linden if (inventoryType == "sound") { - inType = 1; - assType = 1; + inType = (sbyte)InventoryType.Sound; + assType = (sbyte)AssetType.Sound; } else if (inventoryType == "snapshot") { @@ -507,19 +507,19 @@ namespace OpenSim.Region.ClientStack.Linden } else if (inventoryType == "animation") { - inType = 19; - assType = 20; + inType = (sbyte)InventoryType.Animation; + assType = (sbyte)AssetType.Animation; } else if (inventoryType == "wearable") { - inType = 18; + inType = (sbyte)InventoryType.Wearable; switch (assetType) { case "bodypart": - assType = 13; + assType = (sbyte)AssetType.Bodypart; break; case "clothing": - assType = 5; + assType = (sbyte)AssetType.Clothing; break; } } -- cgit v1.1