managed to produce and kill the same exception on mono as on .net. Hopefully

this means .net is fixed.
afrisby
Sean Dague 2007-11-14 16:35:51 +00:00
parent 28ff73129b
commit ec48b67276
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}