Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen

This commit is contained in:
John Hurliman
2009-11-05 13:10:58 -08:00
parent e6d7303b29
commit afef1ac191
31 changed files with 105 additions and 122 deletions

View File

@@ -1562,11 +1562,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
assets = doc.GetElementsByTagName("RequiredAsset");
foreach (XmlNode asset in assets)
{
AssetBase rass = new AssetBase();
rass.FullID = UUID.Random();
rass.Name = GetStringAttribute(asset,"name","");
AssetBase rass = new AssetBase(UUID.Random(), GetStringAttribute(asset,"name",""), SByte.Parse(GetStringAttribute(asset,"type","")));
rass.Description = GetStringAttribute(asset,"desc","");
rass.Type = SByte.Parse(GetStringAttribute(asset,"type",""));
rass.Local = Boolean.Parse(GetStringAttribute(asset,"local",""));
rass.Temporary = Boolean.Parse(GetStringAttribute(asset,"temporary",""));
rass.Data = Convert.FromBase64String(asset.InnerText);