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