aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
authorHomer Horwitz2009-05-09 21:11:12 +0000
committerHomer Horwitz2009-05-09 21:11:12 +0000
commit1d234ca83f64b31b559ace3f63ebbba9f4903778 (patch)
tree887ba461d3ff20432806672786cbb82ff39b9aa4 /OpenSim/ApplicationPlugins
parent* Code to make MRM debugging easier. (diff)
downloadopensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.zip
opensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.tar.gz
opensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.tar.bz2
opensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.tar.xz
Fixed handling of inventory a bit
- AssetType isn't InventoryType. Those enums contain different numbers. Use AssetType for the asset type, InventoryType for the inventory type. - The ToString method (or ToLower) of AssetType/InventoryType doesn't necessarily return the correct LLSD string. - Replaced several magic numbers by their corresponding enum. - Fixed the invType for gestures and animations in the library. This should fix Mantis #3610 and the non-terminating inventory loading
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
index ae242bd..5de44b6 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
@@ -2045,7 +2045,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2045 // good as having type be specified in the XML. 2045 // good as having type be specified in the XML.
2046 2046
2047 if (ic.Item.AssetType == (int) AssetType.Unknown || 2047 if (ic.Item.AssetType == (int) AssetType.Unknown ||
2048 ic.Item.InvType == (int) AssetType.Unknown) 2048 ic.Item.InvType == (int) InventoryType.Unknown)
2049 { 2049 {
2050 Rest.Log.DebugFormat("{0} Attempting to infer item type", MsgId); 2050 Rest.Log.DebugFormat("{0} Attempting to infer item type", MsgId);
2051 2051
@@ -2078,8 +2078,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2078 MsgId, parts[parts.Length-1]); 2078 MsgId, parts[parts.Length-1]);
2079 if (ic.Item.AssetType == (int) AssetType.Unknown) 2079 if (ic.Item.AssetType == (int) AssetType.Unknown)
2080 ic.Item.AssetType = (int) AssetType.ImageJPEG; 2080 ic.Item.AssetType = (int) AssetType.ImageJPEG;
2081 if (ic.Item.InvType == (int) AssetType.Unknown) 2081 if (ic.Item.InvType == (int) InventoryType.Unknown)
2082 ic.Item.InvType = (int) AssetType.ImageJPEG; 2082 ic.Item.InvType = (int) InventoryType.Texture;
2083 break; 2083 break;
2084 case "jpg" : 2084 case "jpg" :
2085 case "jpeg" : 2085 case "jpeg" :
@@ -2087,8 +2087,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2087 MsgId, parts[parts.Length - 1]); 2087 MsgId, parts[parts.Length - 1]);
2088 if (ic.Item.AssetType == (int) AssetType.Unknown) 2088 if (ic.Item.AssetType == (int) AssetType.Unknown)
2089 ic.Item.AssetType = (int) AssetType.ImageJPEG; 2089 ic.Item.AssetType = (int) AssetType.ImageJPEG;
2090 if (ic.Item.InvType == (int) AssetType.Unknown) 2090 if (ic.Item.InvType == (int) InventoryType.Unknown)
2091 ic.Item.InvType = (int) AssetType.ImageJPEG; 2091 ic.Item.InvType = (int) InventoryType.Texture;
2092 break; 2092 break;
2093 case "tga" : 2093 case "tga" :
2094 if (parts[parts.Length - 2].IndexOf("_texture") != -1) 2094 if (parts[parts.Length - 2].IndexOf("_texture") != -1)
@@ -2096,14 +2096,14 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2096 if (ic.Item.AssetType == (int) AssetType.Unknown) 2096 if (ic.Item.AssetType == (int) AssetType.Unknown)
2097 ic.Item.AssetType = (int) AssetType.TextureTGA; 2097 ic.Item.AssetType = (int) AssetType.TextureTGA;
2098 if (ic.Item.InvType == (int) AssetType.Unknown) 2098 if (ic.Item.InvType == (int) AssetType.Unknown)
2099 ic.Item.InvType = (int) AssetType.TextureTGA; 2099 ic.Item.InvType = (int) InventoryType.Texture;
2100 } 2100 }
2101 else 2101 else
2102 { 2102 {
2103 if (ic.Item.AssetType == (int) AssetType.Unknown) 2103 if (ic.Item.AssetType == (int) AssetType.Unknown)
2104 ic.Item.AssetType = (int) AssetType.ImageTGA; 2104 ic.Item.AssetType = (int) AssetType.ImageTGA;
2105 if (ic.Item.InvType == (int) AssetType.Unknown) 2105 if (ic.Item.InvType == (int) InventoryType.Unknown)
2106 ic.Item.InvType = (int) AssetType.ImageTGA; 2106 ic.Item.InvType = (int) InventoryType.Snapshot;
2107 } 2107 }
2108 break; 2108 break;
2109 default : 2109 default :