diff options
author | Melanie Thielker | 2010-05-03 23:45:05 +0200 |
---|---|---|
committer | Melanie | 2010-05-03 23:11:37 +0100 |
commit | 92dff5edb1333a798e21f956ea6291b357dd0c20 (patch) | |
tree | df39e9dfd3145ebb6b5efd4d099e931723c948b2 /OpenSim/Data/MySQL/MySQLXInventoryData.cs | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-92dff5edb1333a798e21f956ea6291b357dd0c20.zip opensim-SC_OLD-92dff5edb1333a798e21f956ea6291b357dd0c20.tar.gz opensim-SC_OLD-92dff5edb1333a798e21f956ea6291b357dd0c20.tar.bz2 opensim-SC_OLD-92dff5edb1333a798e21f956ea6291b357dd0c20.tar.xz |
Add folder version incrementing to XInventoryService. Fixes offline give
for avatar->avatar
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLXInventoryData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLXInventoryData.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs index 307a4c7..a3b728b 100644 --- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs | |||
@@ -160,5 +160,36 @@ namespace OpenSim.Data.MySQL | |||
160 | } | 160 | } |
161 | } | 161 | } |
162 | } | 162 | } |
163 | |||
164 | public override bool Store(XInventoryItem item) | ||
165 | { | ||
166 | if (base.Store(item)) | ||
167 | return false; | ||
168 | |||
169 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | ||
170 | { | ||
171 | dbcon.Open(); | ||
172 | |||
173 | using (MySqlCommand cmd = new MySqlCommand()) | ||
174 | { | ||
175 | cmd.Connection = dbcon; | ||
176 | |||
177 | cmd.CommandText = String.Format("update inventoryfolders set version=version+1 where folderID = ?folderID"); | ||
178 | cmd.Parameters.AddWithValue("?folderID", item.parentFolderID.ToString()); | ||
179 | |||
180 | try | ||
181 | { | ||
182 | cmd.ExecuteNonQuery(); | ||
183 | } | ||
184 | catch (Exception e) | ||
185 | { | ||
186 | return false; | ||
187 | } | ||
188 | cmd.Dispose(); | ||
189 | } | ||
190 | dbcon.Close(); | ||
191 | } | ||
192 | return true; | ||
193 | } | ||
163 | } | 194 | } |
164 | } | 195 | } |