aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteAssetData.cs
diff options
context:
space:
mode:
authorDiva Canto2012-11-14 07:50:58 -0800
committerDiva Canto2012-11-14 07:50:58 -0800
commitfcaddd901c41647cf20321790a8f36fea9c8280b (patch)
treeacc1ab88d2b6b39b141168cb6d4679d84b32a2b6 /OpenSim/Data/SQLite/SQLiteAssetData.cs
parentPossibly fixes mantis #6429 (Flotsam cache having a null ref to the asset ser... (diff)
parentMore consistently dispose of SqliteCommand in OpenSim.Data.SQLite where possi... (diff)
downloadopensim-SC_OLD-fcaddd901c41647cf20321790a8f36fea9c8280b.zip
opensim-SC_OLD-fcaddd901c41647cf20321790a8f36fea9c8280b.tar.gz
opensim-SC_OLD-fcaddd901c41647cf20321790a8f36fea9c8280b.tar.bz2
opensim-SC_OLD-fcaddd901c41647cf20321790a8f36fea9c8280b.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index d0e24c3..61e7aaf 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -202,7 +202,8 @@ namespace OpenSim.Data.SQLite
202 /// <returns>True if exist, or false.</returns> 202 /// <returns>True if exist, or false.</returns>
203 override public bool ExistsAsset(UUID uuid) 203 override public bool ExistsAsset(UUID uuid)
204 { 204 {
205 lock (this) { 205 lock (this)
206 {
206 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) 207 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
207 { 208 {
208 cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString())); 209 cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString()));
@@ -353,12 +354,13 @@ namespace OpenSim.Data.SQLite
353 { 354 {
354 lock (this) 355 lock (this)
355 { 356 {
356 using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) 357 using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn))
357 { 358 {
358 cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString())); 359 cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString()));
359 cmd.ExecuteNonQuery(); 360 cmd.ExecuteNonQuery();
360 } 361 }
361 } 362 }
363
362 return true; 364 return true;
363 } 365 }
364 366