diff options
author | John Hurliman | 2009-11-05 13:10:58 -0800 |
---|---|---|
committer | John Hurliman | 2009-11-05 13:10:58 -0800 |
commit | afef1ac191d32e9c1514c294b17e404b1d4ae217 (patch) | |
tree | c390ef81c9c30922c2e95e32844832919884fd9c /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |
parent | Applying #4332, optional packet statistics logging (diff) | |
download | opensim-SC-afef1ac191d32e9c1514c294b17e404b1d4ae217.zip opensim-SC-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.gz opensim-SC-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.bz2 opensim-SC-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.xz |
Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen
Diffstat (limited to '')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 5 |
1 files changed, 1 insertions, 4 deletions
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 | |||
1562 | assets = doc.GetElementsByTagName("RequiredAsset"); | 1562 | assets = doc.GetElementsByTagName("RequiredAsset"); |
1563 | foreach (XmlNode asset in assets) | 1563 | foreach (XmlNode asset in assets) |
1564 | { | 1564 | { |
1565 | AssetBase rass = new AssetBase(); | 1565 | AssetBase rass = new AssetBase(UUID.Random(), GetStringAttribute(asset,"name",""), SByte.Parse(GetStringAttribute(asset,"type",""))); |
1566 | rass.FullID = UUID.Random(); | ||
1567 | rass.Name = GetStringAttribute(asset,"name",""); | ||
1568 | rass.Description = GetStringAttribute(asset,"desc",""); | 1566 | rass.Description = GetStringAttribute(asset,"desc",""); |
1569 | rass.Type = SByte.Parse(GetStringAttribute(asset,"type","")); | ||
1570 | rass.Local = Boolean.Parse(GetStringAttribute(asset,"local","")); | 1567 | rass.Local = Boolean.Parse(GetStringAttribute(asset,"local","")); |
1571 | rass.Temporary = Boolean.Parse(GetStringAttribute(asset,"temporary","")); | 1568 | rass.Temporary = Boolean.Parse(GetStringAttribute(asset,"temporary","")); |
1572 | rass.Data = Convert.FromBase64String(asset.InnerText); | 1569 | rass.Data = Convert.FromBase64String(asset.InnerText); |