add locking to the terrain database calls
parent
42318dc15a
commit
0d93069adb
|
@ -233,13 +233,14 @@ namespace OpenSim.DataStore.MonoSqlite
|
|||
MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString());
|
||||
|
||||
DataTable terrain = ds.Tables["terrain"];
|
||||
|
||||
lock (ds) {
|
||||
DataRow newrow = terrain.NewRow();
|
||||
fillTerrainRow(newrow, regionID, revision, ter);
|
||||
terrain.Rows.Add(newrow);
|
||||
|
||||
Commit();
|
||||
}
|
||||
}
|
||||
|
||||
public double[,] LoadTerrain(LLUUID regionID)
|
||||
{
|
||||
|
@ -248,6 +249,7 @@ namespace OpenSim.DataStore.MonoSqlite
|
|||
|
||||
DataTable terrain = ds.Tables["terrain"];
|
||||
|
||||
lock (ds) {
|
||||
DataRow[] rows = terrain.Select("RegionUUID = '" + regionID.ToString() + "'","Revision DESC");
|
||||
|
||||
int rev = 0;
|
||||
|
@ -275,6 +277,7 @@ namespace OpenSim.DataStore.MonoSqlite
|
|||
|
||||
|
||||
MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString());
|
||||
}
|
||||
|
||||
return terret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue