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/Data/SQLite/SQLiteAssetData.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 'OpenSim/Data/SQLite/SQLiteAssetData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteAssetData.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 49275cb..11be28e 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -231,12 +231,13 @@ namespace OpenSim.Data.SQLite | |||
231 | // TODO: this doesn't work yet because something more | 231 | // TODO: this doesn't work yet because something more |
232 | // interesting has to be done to actually get these values | 232 | // interesting has to be done to actually get these values |
233 | // back out. Not enough time to figure it out yet. | 233 | // back out. Not enough time to figure it out yet. |
234 | AssetBase asset = new AssetBase(); | 234 | AssetBase asset = new AssetBase( |
235 | new UUID((String)row["UUID"]), | ||
236 | (String)row["Name"], | ||
237 | Convert.ToSByte(row["Type"]) | ||
238 | ); | ||
235 | 239 | ||
236 | asset.FullID = new UUID((String) row["UUID"]); | ||
237 | asset.Name = (String) row["Name"]; | ||
238 | asset.Description = (String) row["Description"]; | 240 | asset.Description = (String) row["Description"]; |
239 | asset.Type = Convert.ToSByte(row["Type"]); | ||
240 | asset.Local = Convert.ToBoolean(row["Local"]); | 241 | asset.Local = Convert.ToBoolean(row["Local"]); |
241 | asset.Temporary = Convert.ToBoolean(row["Temporary"]); | 242 | asset.Temporary = Convert.ToBoolean(row["Temporary"]); |
242 | asset.Data = (byte[]) row["Data"]; | 243 | asset.Data = (byte[]) row["Data"]; |