diff options
author | AliciaRaven | 2016-04-05 21:52:28 +0100 |
---|---|---|
committer | AliciaRaven | 2016-04-05 21:52:28 +0100 |
commit | 3ff19a8ac3c484a6aec99c408b23801346521b0c (patch) | |
tree | e7f00df0b771ed30ab2bbf0ce6472c42475f3794 /OpenSim/Data | |
parent | Correct case in the names of the Avatar and Friends tables (diff) | |
download | opensim-SC-3ff19a8ac3c484a6aec99c408b23801346521b0c.zip opensim-SC-3ff19a8ac3c484a6aec99c408b23801346521b0c.tar.gz opensim-SC-3ff19a8ac3c484a6aec99c408b23801346521b0c.tar.bz2 opensim-SC-3ff19a8ac3c484a6aec99c408b23801346521b0c.tar.xz |
Fix missing id parameter in FSAssets database connector when updating Access time.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLFSAssetData.cs | 6 |
1 files changed, 3 insertions, 3 deletions
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 | |||
172 | meta.Flags = (AssetFlags)Convert.ToInt32(reader["asset_flags"]); | 172 | meta.Flags = (AssetFlags)Convert.ToInt32(reader["asset_flags"]); |
173 | 173 | ||
174 | int AccessTime = Convert.ToInt32(reader["access_time"]); | 174 | int AccessTime = Convert.ToInt32(reader["access_time"]); |
175 | UpdateAccessTime(AccessTime); | 175 | UpdateAccessTime(id, AccessTime); |
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
@@ -181,7 +181,7 @@ namespace OpenSim.Data.MySQL | |||
181 | return meta; | 181 | return meta; |
182 | } | 182 | } |
183 | 183 | ||
184 | private void UpdateAccessTime(int AccessTime) | 184 | private void UpdateAccessTime(string AssetID, int AccessTime) |
185 | { | 185 | { |
186 | // Reduce DB work by only updating access time if asset hasn't recently been accessed | 186 | // Reduce DB work by only updating access time if asset hasn't recently been accessed |
187 | // 0 By Default, Config option is "DaysBetweenAccessTimeUpdates" | 187 | // 0 By Default, Config option is "DaysBetweenAccessTimeUpdates" |
@@ -203,7 +203,7 @@ namespace OpenSim.Data.MySQL | |||
203 | using (MySqlCommand cmd = conn.CreateCommand()) | 203 | using (MySqlCommand cmd = conn.CreateCommand()) |
204 | { | 204 | { |
205 | cmd.CommandText = String.Format("UPDATE {0} SET `access_time` = UNIX_TIMESTAMP() WHERE `id` = ?id", m_Table); | 205 | cmd.CommandText = String.Format("UPDATE {0} SET `access_time` = UNIX_TIMESTAMP() WHERE `id` = ?id", m_Table); |
206 | 206 | cmd.Parameters.AddWithValue("?id", AssetID); | |
207 | cmd.ExecuteNonQuery(); | 207 | cmd.ExecuteNonQuery(); |
208 | } | 208 | } |
209 | } | 209 | } |