From ec48b67276f3ee987c4dd427a6da53baf7690b6b Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 14 Nov 2007 16:35:51 +0000 Subject: managed to produce and kill the same exception on mono as on .net. Hopefully this means .net is fixed. --- .../Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim') 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 { int revision = Util.UnixTimeSinceEpoch(); SqliteConnection conn = new SqliteConnection(connectionString); + conn.Open(); MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString()); DataTable terrain = ds.Tables["terrain"]; @@ -263,11 +264,13 @@ namespace OpenSim.DataStore.MonoSqlite cmd.ExecuteNonQuery(); } } + conn.Close(); } public double[,] LoadTerrain(LLUUID regionID) { SqliteConnection conn = new SqliteConnection(connectionString); + conn.Open(); double[,] terret = new double[256,256]; terret.Initialize(); String sql = "select RegionUUID, Revision, Heightfield from terrain" + @@ -299,12 +302,14 @@ namespace OpenSim.DataStore.MonoSqlite else { MainLog.Instance.Verbose("DATASTORE", "No terrain found for region"); + conn.Close(); return null; } MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString()); } } + conn.Close(); return terret; } -- cgit v1.1