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/MSSQL | |
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/MSSQL')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLAssetData.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs index 25f7cf0..1ce4abf 100644 --- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs | |||
@@ -132,12 +132,13 @@ namespace OpenSim.Data.MSSQL | |||
132 | { | 132 | { |
133 | if (reader.Read()) | 133 | if (reader.Read()) |
134 | { | 134 | { |
135 | AssetBase asset = new AssetBase(); | 135 | AssetBase asset = new AssetBase( |
136 | new UUID((Guid)reader["id"]), | ||
137 | (string)reader["name"], | ||
138 | Convert.ToSByte(reader["assetType"]) | ||
139 | ); | ||
136 | // Region Main | 140 | // Region Main |
137 | asset.FullID = new UUID((Guid)reader["id"]); | ||
138 | asset.Name = (string)reader["name"]; | ||
139 | asset.Description = (string)reader["description"]; | 141 | asset.Description = (string)reader["description"]; |
140 | asset.Type = Convert.ToSByte(reader["assetType"]); | ||
141 | asset.Local = Convert.ToBoolean(reader["local"]); | 142 | asset.Local = Convert.ToBoolean(reader["local"]); |
142 | asset.Temporary = Convert.ToBoolean(reader["temporary"]); | 143 | asset.Temporary = Convert.ToBoolean(reader["temporary"]); |
143 | asset.Data = (byte[])reader["data"]; | 144 | asset.Data = (byte[])reader["data"]; |