diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLEstateData.cs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 7fe1fcc..d0c02f0 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs | |||
@@ -447,23 +447,29 @@ namespace OpenSim.Data.MySQL | |||
447 | { | 447 | { |
448 | dbcon.Open(); | 448 | dbcon.Open(); |
449 | 449 | ||
450 | using (MySqlCommand cmd = dbcon.CreateCommand()) | 450 | try |
451 | { | 451 | { |
452 | cmd.CommandText = "insert into estate_map values (?RegionID, ?EstateID)"; | 452 | using (MySqlCommand cmd = dbcon.CreateCommand()) |
453 | cmd.Parameters.AddWithValue("?RegionID", regionID); | ||
454 | cmd.Parameters.AddWithValue("?EstateID", estateID); | ||
455 | |||
456 | if (cmd.ExecuteNonQuery() == 0) | ||
457 | { | 453 | { |
454 | cmd.CommandText = "insert into estate_map values (?RegionID, ?EstateID)"; | ||
455 | cmd.Parameters.AddWithValue("?RegionID", regionID); | ||
456 | cmd.Parameters.AddWithValue("?EstateID", estateID); | ||
457 | |||
458 | int ret = cmd.ExecuteNonQuery(); | ||
458 | dbcon.Close(); | 459 | dbcon.Close(); |
459 | return false; | 460 | |
461 | return (ret != 0); | ||
460 | } | 462 | } |
461 | } | 463 | } |
464 | catch (MySqlException ex) | ||
465 | { | ||
466 | m_log.Error("[REGION DB]: LinkRegion failed: " + ex.Message); | ||
467 | } | ||
462 | 468 | ||
463 | dbcon.Close(); | 469 | dbcon.Close(); |
464 | } | 470 | } |
465 | 471 | ||
466 | return true; | 472 | return false; |
467 | } | 473 | } |
468 | 474 | ||
469 | public List<UUID> GetRegions(int estateID) | 475 | public List<UUID> GetRegions(int estateID) |