aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs34
1 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 508e053..2211d4c 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -137,18 +137,18 @@ namespace OpenSim.Data.MySQL
137 { 137 {
138 asset = new AssetBase(); 138 asset = new AssetBase();
139 asset.Data = (byte[]) dbReader["data"]; 139 asset.Data = (byte[]) dbReader["data"];
140 asset.Metadata.Description = (string) dbReader["description"]; 140 asset.Description = (string) dbReader["description"];
141 asset.Metadata.FullID = assetID; 141 asset.FullID = assetID;
142 try 142 try
143 { 143 {
144 asset.Metadata.Local = (bool)dbReader["local"]; 144 asset.Local = (bool)dbReader["local"];
145 } 145 }
146 catch (InvalidCastException) 146 catch (InvalidCastException)
147 { 147 {
148 asset.Metadata.Local = false; 148 asset.Local = false;
149 } 149 }
150 asset.Metadata.Name = (string) dbReader["name"]; 150 asset.Name = (string) dbReader["name"];
151 asset.Metadata.Type = (sbyte) dbReader["assetType"]; 151 asset.Type = (sbyte) dbReader["assetType"];
152 } 152 }
153 dbReader.Close(); 153 dbReader.Close();
154 cmd.Dispose(); 154 cmd.Dispose();
@@ -176,8 +176,8 @@ namespace OpenSim.Data.MySQL
176 { 176 {
177 lock (_dbConnection) 177 lock (_dbConnection)
178 { 178 {
179 //m_log.Info("[ASSET DB]: Creating Asset " + Util.ToRawUuidString(asset.Metadata.FullID)); 179 //m_log.Info("[ASSET DB]: Creating Asset " + Util.ToRawUuidString(asset.FullID));
180 if (ExistsAsset(asset.Metadata.FullID)) 180 if (ExistsAsset(asset.FullID))
181 { 181 {
182 //m_log.Info("[ASSET DB]: Asset exists already, ignoring."); 182 //m_log.Info("[ASSET DB]: Asset exists already, ignoring.");
183 return; 183 return;
@@ -198,12 +198,12 @@ namespace OpenSim.Data.MySQL
198 { 198 {
199 // create unix epoch time 199 // create unix epoch time
200 int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000); 200 int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000);
201 cmd.Parameters.AddWithValue("?id", asset.Metadata.ID); 201 cmd.Parameters.AddWithValue("?id", asset.ID);
202 cmd.Parameters.AddWithValue("?name", asset.Metadata.Name); 202 cmd.Parameters.AddWithValue("?name", asset.Name);
203 cmd.Parameters.AddWithValue("?description", asset.Metadata.Description); 203 cmd.Parameters.AddWithValue("?description", asset.Description);
204 cmd.Parameters.AddWithValue("?assetType", asset.Metadata.Type); 204 cmd.Parameters.AddWithValue("?assetType", asset.Type);
205 cmd.Parameters.AddWithValue("?local", asset.Metadata.Local); 205 cmd.Parameters.AddWithValue("?local", asset.Local);
206 cmd.Parameters.AddWithValue("?temporary", asset.Metadata.Temporary); 206 cmd.Parameters.AddWithValue("?temporary", asset.Temporary);
207 cmd.Parameters.AddWithValue("?create_time", now); 207 cmd.Parameters.AddWithValue("?create_time", now);
208 cmd.Parameters.AddWithValue("?access_time", now); 208 cmd.Parameters.AddWithValue("?access_time", now);
209 cmd.Parameters.AddWithValue("?data", asset.Data); 209 cmd.Parameters.AddWithValue("?data", asset.Data);
@@ -216,7 +216,7 @@ namespace OpenSim.Data.MySQL
216 m_log.ErrorFormat( 216 m_log.ErrorFormat(
217 "[ASSETS DB]: " + 217 "[ASSETS DB]: " +
218 "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() 218 "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString()
219 + Environment.NewLine + "Attempting reconnection", asset.Metadata.FullID, asset.Metadata.Name); 219 + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name);
220 _dbConnection.Reconnect(); 220 _dbConnection.Reconnect();
221 } 221 }
222 } 222 }
@@ -239,7 +239,7 @@ namespace OpenSim.Data.MySQL
239 { 239 {
240 // create unix epoch time 240 // create unix epoch time
241 int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000); 241 int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000);
242 cmd.Parameters.AddWithValue("?id", asset.Metadata.ID); 242 cmd.Parameters.AddWithValue("?id", asset.ID);
243 cmd.Parameters.AddWithValue("?access_time", now); 243 cmd.Parameters.AddWithValue("?access_time", now);
244 cmd.ExecuteNonQuery(); 244 cmd.ExecuteNonQuery();
245 cmd.Dispose(); 245 cmd.Dispose();
@@ -250,7 +250,7 @@ namespace OpenSim.Data.MySQL
250 m_log.ErrorFormat( 250 m_log.ErrorFormat(
251 "[ASSETS DB]: " + 251 "[ASSETS DB]: " +
252 "MySql failure updating access_time for asset {0} with name {1}" + Environment.NewLine + e.ToString() 252 "MySql failure updating access_time for asset {0} with name {1}" + Environment.NewLine + e.ToString()
253 + Environment.NewLine + "Attempting reconnection", asset.Metadata.FullID, asset.Metadata.Name); 253 + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name);
254 _dbConnection.Reconnect(); 254 _dbConnection.Reconnect();
255 } 255 }
256 } 256 }