From afef1ac191d32e9c1514c294b17e404b1d4ae217 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 5 Nov 2009 13:10:58 -0800 Subject: Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen --- OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'OpenSim/ApplicationPlugins/RemoteController') diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 3c7727f..3149eaa 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -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); -- cgit v1.1