diff options
author | Melanie Thielker | 2014-06-21 00:39:55 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-06-21 00:39:55 +0200 |
commit | 159fcbf150b7da0e229b29aa7b94793484543d12 (patch) | |
tree | b8c0ff3b4c758a3fba8315b556c923ef4c02a185 /OpenSim/Data/MySQL/MySQLOfflineIMData.cs | |
parent | Merge commit '68c8633ba18f0a11cfc0ed04d1d0c7c59e6cec76' (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.zip opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.tar.gz opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.tar.bz2 opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Conflicts:
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLOfflineIMData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLOfflineIMData.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/OpenSim/Data/MySQL/MySQLOfflineIMData.cs b/OpenSim/Data/MySQL/MySQLOfflineIMData.cs index 252f358..bafd204 100644 --- a/OpenSim/Data/MySQL/MySQLOfflineIMData.cs +++ b/OpenSim/Data/MySQL/MySQLOfflineIMData.cs | |||
@@ -47,13 +47,10 @@ namespace OpenSim.Data.MySQL | |||
47 | 47 | ||
48 | public void DeleteOld() | 48 | public void DeleteOld() |
49 | { | 49 | { |
50 | uint now = (uint)Util.UnixTimeSinceEpoch(); | ||
51 | |||
52 | using (MySqlCommand cmd = new MySqlCommand()) | 50 | using (MySqlCommand cmd = new MySqlCommand()) |
53 | { | 51 | { |
54 | cmd.CommandText = String.Format("delete from {0} where TMStamp < ?tstamp", m_Realm); | 52 | cmd.CommandText = String.Format("delete from {0} where TMStamp < NOW() - INTERVAL 2 WEEK", m_Realm); |
55 | cmd.Parameters.AddWithValue("?tstamp", now - 14 * 24 * 60 * 60); // > 2 weeks old | 53 | |
56 | |||
57 | ExecuteNonQuery(cmd); | 54 | ExecuteNonQuery(cmd); |
58 | } | 55 | } |
59 | 56 | ||