aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs31
1 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index d0c02f0..08e2144 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -474,7 +474,36 @@ namespace OpenSim.Data.MySQL
474 474
475 public List<UUID> GetRegions(int estateID) 475 public List<UUID> GetRegions(int estateID)
476 { 476 {
477 return new List<UUID>(); 477 List<UUID> result = new List<UUID>();
478
479 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
480 {
481 dbcon.Open();
482
483 try
484 {
485 using (MySqlCommand cmd = dbcon.CreateCommand())
486 {
487 cmd.CommandText = "select RegionID from estate_map where EstateID = ?EstateID";
488 cmd.Parameters.AddWithValue("?EstateID", estateID.ToString());
489
490 using (IDataReader reader = cmd.ExecuteReader())
491 {
492 while(reader.Read())
493 result.Add(new UUID(reader["RegionID"].ToString()));
494 reader.Close();
495 }
496 }
497 }
498 catch (Exception e)
499 {
500 m_log.Error("[REGION DB]: Error reading estate map. " + e.ToString());
501 return result;
502 }
503 dbcon.Close();
504 }
505
506 return result;
478 } 507 }
479 508
480 public bool DeleteEstate(int estateID) 509 public bool DeleteEstate(int estateID)