diff options
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLEstateData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLEstateData.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 12593f6..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,13 +171,14 @@ namespace OpenSim.Data.MySQL | |||
171 | } | 171 | } |
172 | } | 172 | } |
173 | } | 173 | } |
174 | dbcon.Close(); | ||
175 | cmd.Connection = null; | ||
176 | |||
174 | if (!found && create) | 177 | if (!found && create) |
175 | { | 178 | { |
176 | DoCreate(es); | 179 | DoCreate(es); |
177 | LinkRegion(regionID, (int)es.EstateID); | 180 | LinkRegion(regionID, (int)es.EstateID); |
178 | } | 181 | } |
179 | cmd.Connection = null; | ||
180 | dbcon.Close(); | ||
181 | } | 182 | } |
182 | 183 | ||
183 | LoadBanList(es); | 184 | LoadBanList(es); |