aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLFSAssetData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLFSAssetData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLFSAssetData.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLFSAssetData.cs b/OpenSim/Data/MySQL/MySQLFSAssetData.cs
index 2837ce3..0918596 100644
--- a/OpenSim/Data/MySQL/MySQLFSAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLFSAssetData.cs
@@ -121,9 +121,13 @@ namespace OpenSim.Data.MySQL
121 } 121 }
122 catch (MySqlException e) 122 catch (MySqlException e)
123 { 123 {
124 cmd.Connection = null;
125 conn.Close();
124 m_log.ErrorFormat("[FSASSETS]: Query {0} failed with {1}", cmd.CommandText, e.ToString()); 126 m_log.ErrorFormat("[FSASSETS]: Query {0} failed with {1}", cmd.CommandText, e.ToString());
125 return false; 127 return false;
126 } 128 }
129 cmd.Connection = null;
130 conn.Close();
127 } 131 }
128 132
129 return true; 133 return true;
@@ -175,7 +179,7 @@ namespace OpenSim.Data.MySQL
175 UpdateAccessTime(id, AccessTime); 179 UpdateAccessTime(id, AccessTime);
176 } 180 }
177 } 181 }
178 182 conn.Close();
179 } 183 }
180 184
181 return meta; 185 return meta;
@@ -206,6 +210,7 @@ namespace OpenSim.Data.MySQL
206 cmd.Parameters.AddWithValue("?id", AssetID); 210 cmd.Parameters.AddWithValue("?id", AssetID);
207 cmd.ExecuteNonQuery(); 211 cmd.ExecuteNonQuery();
208 } 212 }
213 conn.Close();
209 } 214 }
210 } 215 }
211 216
@@ -299,6 +304,7 @@ namespace OpenSim.Data.MySQL
299 } 304 }
300 } 305 }
301 } 306 }
307 conn.Close();
302 } 308 }
303 309
304 for (int i = 0; i < uuids.Length; i++) 310 for (int i = 0; i < uuids.Length; i++)
@@ -333,6 +339,7 @@ namespace OpenSim.Data.MySQL
333 count = Convert.ToInt32(reader["count"]); 339 count = Convert.ToInt32(reader["count"]);
334 } 340 }
335 } 341 }
342 conn.Close();
336 } 343 }
337 344
338 return count; 345 return count;
@@ -413,8 +420,8 @@ namespace OpenSim.Data.MySQL
413 imported++; 420 imported++;
414 } 421 }
415 } 422 }
416
417 } 423 }
424 importConn.Close();
418 } 425 }
419 426
420 MainConsole.Instance.Output(String.Format("Import done, {0} assets imported", imported)); 427 MainConsole.Instance.Output(String.Format("Import done, {0} assets imported", imported));