diff options
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLEstateData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLEstateData.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index a5c8d24..eeedf02 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs | |||
@@ -82,6 +82,7 @@ namespace OpenSim.Data.MySQL | |||
82 | 82 | ||
83 | Migration m = new Migration(dbcon, Assembly, "EstateStore"); | 83 | Migration m = new Migration(dbcon, Assembly, "EstateStore"); |
84 | m.Update(); | 84 | m.Update(); |
85 | dbcon.Close(); | ||
85 | 86 | ||
86 | Type t = typeof(EstateSettings); | 87 | Type t = typeof(EstateSettings); |
87 | m_Fields = t.GetFields(BindingFlags.NonPublic | | 88 | m_Fields = t.GetFields(BindingFlags.NonPublic | |
@@ -143,7 +144,6 @@ namespace OpenSim.Data.MySQL | |||
143 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | 144 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) |
144 | { | 145 | { |
145 | dbcon.Open(); | 146 | dbcon.Open(); |
146 | |||
147 | cmd.Connection = dbcon; | 147 | cmd.Connection = dbcon; |
148 | 148 | ||
149 | bool found = false; | 149 | bool found = false; |
@@ -171,6 +171,8 @@ namespace OpenSim.Data.MySQL | |||
171 | } | 171 | } |
172 | } | 172 | } |
173 | } | 173 | } |
174 | dbcon.Close(); | ||
175 | cmd.Connection = null; | ||
174 | 176 | ||
175 | if (!found && create) | 177 | if (!found && create) |
176 | { | 178 | { |
@@ -231,6 +233,7 @@ namespace OpenSim.Data.MySQL | |||
231 | 233 | ||
232 | es.Save(); | 234 | es.Save(); |
233 | } | 235 | } |
236 | dbcon.Close(); | ||
234 | } | 237 | } |
235 | } | 238 | } |
236 | 239 | ||
@@ -263,6 +266,7 @@ namespace OpenSim.Data.MySQL | |||
263 | 266 | ||
264 | cmd.ExecuteNonQuery(); | 267 | cmd.ExecuteNonQuery(); |
265 | } | 268 | } |
269 | dbcon.Close(); | ||
266 | } | 270 | } |
267 | 271 | ||
268 | SaveBanList(es); | 272 | SaveBanList(es); |
@@ -300,6 +304,7 @@ namespace OpenSim.Data.MySQL | |||
300 | } | 304 | } |
301 | } | 305 | } |
302 | } | 306 | } |
307 | dbcon.Close(); | ||
303 | } | 308 | } |
304 | } | 309 | } |
305 | 310 | ||
@@ -329,6 +334,7 @@ namespace OpenSim.Data.MySQL | |||
329 | cmd.Parameters.Clear(); | 334 | cmd.Parameters.Clear(); |
330 | } | 335 | } |
331 | } | 336 | } |
337 | dbcon.Close(); | ||
332 | } | 338 | } |
333 | } | 339 | } |
334 | 340 | ||
@@ -358,6 +364,7 @@ namespace OpenSim.Data.MySQL | |||
358 | cmd.Parameters.Clear(); | 364 | cmd.Parameters.Clear(); |
359 | } | 365 | } |
360 | } | 366 | } |
367 | dbcon.Close(); | ||
361 | } | 368 | } |
362 | } | 369 | } |
363 | 370 | ||
@@ -383,6 +390,7 @@ namespace OpenSim.Data.MySQL | |||
383 | } | 390 | } |
384 | } | 391 | } |
385 | } | 392 | } |
393 | dbcon.Close(); | ||
386 | } | 394 | } |
387 | 395 | ||
388 | return uuids.ToArray(); | 396 | return uuids.ToArray(); |
@@ -437,7 +445,6 @@ namespace OpenSim.Data.MySQL | |||
437 | reader.Close(); | 445 | reader.Close(); |
438 | } | 446 | } |
439 | } | 447 | } |
440 | |||
441 | dbcon.Close(); | 448 | dbcon.Close(); |
442 | } | 449 | } |
443 | 450 | ||
@@ -466,7 +473,6 @@ namespace OpenSim.Data.MySQL | |||
466 | reader.Close(); | 473 | reader.Close(); |
467 | } | 474 | } |
468 | } | 475 | } |
469 | |||
470 | dbcon.Close(); | 476 | dbcon.Close(); |
471 | } | 477 | } |
472 | 478 | ||