aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLAssetData.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-11-05 13:10:58 -0800
committerJohn Hurliman2009-11-05 13:10:58 -0800
commitafef1ac191d32e9c1514c294b17e404b1d4ae217 (patch)
treec390ef81c9c30922c2e95e32844832919884fd9c /OpenSim/Data/MySQL/MySQLAssetData.cs
parentApplying #4332, optional packet statistics logging (diff)
downloadopensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.zip
opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.gz
opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.bz2
opensim-SC_OLD-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/MySQL/MySQLAssetData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs5
1 files changed, 1 insertions, 4 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 1fe6d29..6a4ccd7 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -151,10 +151,9 @@ namespace OpenSim.Data.MySQL
151 { 151 {
152 if (dbReader.Read()) 152 if (dbReader.Read())
153 { 153 {
154 asset = new AssetBase(); 154 asset = new AssetBase(assetID, (string)dbReader["name"], (sbyte)dbReader["assetType"]);
155 asset.Data = (byte[]) dbReader["data"]; 155 asset.Data = (byte[]) dbReader["data"];
156 asset.Description = (string) dbReader["description"]; 156 asset.Description = (string) dbReader["description"];
157 asset.FullID = assetID;
158 157
159 string local = dbReader["local"].ToString(); 158 string local = dbReader["local"].ToString();
160 if (local.Equals("1") || local.Equals("true", StringComparison.InvariantCultureIgnoreCase)) 159 if (local.Equals("1") || local.Equals("true", StringComparison.InvariantCultureIgnoreCase))
@@ -162,8 +161,6 @@ namespace OpenSim.Data.MySQL
162 else 161 else
163 asset.Local = false; 162 asset.Local = false;
164 163
165 asset.Name = (string) dbReader["name"];
166 asset.Type = (sbyte) dbReader["assetType"];
167 asset.Temporary = Convert.ToBoolean(dbReader["temporary"]); 164 asset.Temporary = Convert.ToBoolean(dbReader["temporary"]);
168 } 165 }
169 dbReader.Close(); 166 dbReader.Close();