diff options
author | Sean Dague | 2007-11-14 16:35:51 +0000 |
---|---|---|
committer | Sean Dague | 2007-11-14 16:35:51 +0000 |
commit | ec48b67276f3ee987c4dd427a6da53baf7690b6b (patch) | |
tree | b309b38222e6cadfaa0f5de3add673ded89c94f0 /OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite | |
parent | bury connect creation deeper down in case this is what .NET hates (diff) | |
download | opensim-SC-ec48b67276f3ee987c4dd427a6da53baf7690b6b.zip opensim-SC-ec48b67276f3ee987c4dd427a6da53baf7690b6b.tar.gz opensim-SC-ec48b67276f3ee987c4dd427a6da53baf7690b6b.tar.bz2 opensim-SC-ec48b67276f3ee987c4dd427a6da53baf7690b6b.tar.xz |
managed to produce and kill the same exception on mono as on .net. Hopefully
this means .net is fixed.
Diffstat (limited to 'OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite')
-rw-r--r-- | OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index cd1c94a..6540b6d 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | |||
@@ -247,6 +247,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
247 | { | 247 | { |
248 | int revision = Util.UnixTimeSinceEpoch(); | 248 | int revision = Util.UnixTimeSinceEpoch(); |
249 | SqliteConnection conn = new SqliteConnection(connectionString); | 249 | SqliteConnection conn = new SqliteConnection(connectionString); |
250 | conn.Open(); | ||
250 | MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString()); | 251 | MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString()); |
251 | 252 | ||
252 | DataTable terrain = ds.Tables["terrain"]; | 253 | DataTable terrain = ds.Tables["terrain"]; |
@@ -263,11 +264,13 @@ namespace OpenSim.DataStore.MonoSqlite | |||
263 | cmd.ExecuteNonQuery(); | 264 | cmd.ExecuteNonQuery(); |
264 | } | 265 | } |
265 | } | 266 | } |
267 | conn.Close(); | ||
266 | } | 268 | } |
267 | 269 | ||
268 | public double[,] LoadTerrain(LLUUID regionID) | 270 | public double[,] LoadTerrain(LLUUID regionID) |
269 | { | 271 | { |
270 | SqliteConnection conn = new SqliteConnection(connectionString); | 272 | SqliteConnection conn = new SqliteConnection(connectionString); |
273 | conn.Open(); | ||
271 | double[,] terret = new double[256,256]; | 274 | double[,] terret = new double[256,256]; |
272 | terret.Initialize(); | 275 | terret.Initialize(); |
273 | String sql = "select RegionUUID, Revision, Heightfield from terrain" + | 276 | String sql = "select RegionUUID, Revision, Heightfield from terrain" + |
@@ -299,12 +302,14 @@ namespace OpenSim.DataStore.MonoSqlite | |||
299 | else | 302 | else |
300 | { | 303 | { |
301 | MainLog.Instance.Verbose("DATASTORE", "No terrain found for region"); | 304 | MainLog.Instance.Verbose("DATASTORE", "No terrain found for region"); |
305 | conn.Close(); | ||
302 | return null; | 306 | return null; |
303 | } | 307 | } |
304 | 308 | ||
305 | MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString()); | 309 | MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString()); |
306 | } | 310 | } |
307 | } | 311 | } |
312 | conn.Close(); | ||
308 | return terret; | 313 | return terret; |
309 | } | 314 | } |
310 | 315 | ||