From 3ff19a8ac3c484a6aec99c408b23801346521b0c Mon Sep 17 00:00:00 2001 From: AliciaRaven Date: Tue, 5 Apr 2016 21:52:28 +0100 Subject: Fix missing id parameter in FSAssets database connector when updating Access time. --- OpenSim/Data/MySQL/MySQLFSAssetData.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLFSAssetData.cs b/OpenSim/Data/MySQL/MySQLFSAssetData.cs index cb1755e..2fb81ae 100644 --- a/OpenSim/Data/MySQL/MySQLFSAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLFSAssetData.cs @@ -172,7 +172,7 @@ namespace OpenSim.Data.MySQL meta.Flags = (AssetFlags)Convert.ToInt32(reader["asset_flags"]); int AccessTime = Convert.ToInt32(reader["access_time"]); - UpdateAccessTime(AccessTime); + UpdateAccessTime(id, AccessTime); } } @@ -181,7 +181,7 @@ namespace OpenSim.Data.MySQL return meta; } - private void UpdateAccessTime(int AccessTime) + private void UpdateAccessTime(string AssetID, int AccessTime) { // Reduce DB work by only updating access time if asset hasn't recently been accessed // 0 By Default, Config option is "DaysBetweenAccessTimeUpdates" @@ -203,7 +203,7 @@ namespace OpenSim.Data.MySQL using (MySqlCommand cmd = conn.CreateCommand()) { cmd.CommandText = String.Format("UPDATE {0} SET `access_time` = UNIX_TIMESTAMP() WHERE `id` = ?id", m_Table); - + cmd.Parameters.AddWithValue("?id", AssetID); cmd.ExecuteNonQuery(); } } -- cgit v1.1