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

@@ -231,12 +231,13 @@ namespace OpenSim.Data.SQLite
// TODO: this doesn't work yet because something more
// interesting has to be done to actually get these values
// back out. Not enough time to figure it out yet.
AssetBase asset = new AssetBase();
AssetBase asset = new AssetBase(
new UUID((String)row["UUID"]),
(String)row["Name"],
Convert.ToSByte(row["Type"])
);
asset.FullID = new UUID((String) row["UUID"]);
asset.Name = (String) row["Name"];
asset.Description = (String) row["Description"];
asset.Type = Convert.ToSByte(row["Type"]);
asset.Local = Convert.ToBoolean(row["Local"]);
asset.Temporary = Convert.ToBoolean(row["Temporary"]);
asset.Data = (byte[]) row["Data"];