diff options
author | UbitUmarov | 2017-05-06 21:43:22 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-06 21:43:22 +0100 |
commit | c57215687f6ab0a9585c5331edc2da89a88b8a28 (patch) | |
tree | b392c3a21531baf4c822d03db3e1d03e303e494a /OpenSim/Data/MySQL/MySQLEstateData.cs | |
parent | don't hold dbconn longer than necessart (diff) | |
download | opensim-SC-c57215687f6ab0a9585c5331edc2da89a88b8a28.zip opensim-SC-c57215687f6ab0a9585c5331edc2da89a88b8a28.tar.gz opensim-SC-c57215687f6ab0a9585c5331edc2da89a88b8a28.tar.bz2 opensim-SC-c57215687f6ab0a9585c5331edc2da89a88b8a28.tar.xz |
a few more changes on mysql
Diffstat (limited to '')
-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); |