From 0e68742afcb65d087ecbe5a7286e55950511966f Mon Sep 17 00:00:00 2001 From: tglion Date: Mon, 5 Sep 2016 07:58:22 +0200 Subject: Fix some wrong handling of booleans for SeeAVs, AnyAVSounds and GroupAVSounds fields in sqlite3-database Signed-off-by: UbitUmarov --- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index d7b3bbe..cd20c4e 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -1354,7 +1354,7 @@ namespace OpenSim.Data.SQLite createCol(land, "Name", typeof(String)); createCol(land, "Desc", typeof(String)); createCol(land, "OwnerUUID", typeof(String)); - createCol(land, "IsGroupOwned", typeof(Boolean)); + createCol(land, "IsGroupOwned", typeof(String)); createCol(land, "Area", typeof(Int32)); createCol(land, "AuctionID", typeof(Int32)); //Unemplemented createCol(land, "Category", typeof(Int32)); //Enum OpenMetaverse.Parcel.ParcelCategory @@ -1387,6 +1387,9 @@ namespace OpenSim.Data.SQLite createCol(land, "MediaLoop", typeof(Boolean)); createCol(land, "ObscureMedia", typeof(Boolean)); createCol(land, "ObscureMusic", typeof(Boolean)); + createCol(land, "SeeAVs", typeof(Boolean)); + createCol(land, "AnyAVSounds", typeof(Boolean)); + createCol(land, "GroupAVSounds", typeof(Boolean)); land.PrimaryKey = new DataColumn[] { land.Columns["UUID"] }; @@ -1829,7 +1832,7 @@ namespace OpenSim.Data.SQLite newData.Name = (String)row["Name"]; newData.Description = (String)row["Desc"]; newData.OwnerID = (UUID)(String)row["OwnerUUID"]; - newData.IsGroupOwned = (Boolean)row["IsGroupOwned"]; + newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); newData.Area = Convert.ToInt32(row["Area"]); newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented newData.Category = (ParcelCategory)Convert.ToInt32(row["Category"]); @@ -2245,7 +2248,7 @@ namespace OpenSim.Data.SQLite row["Name"] = land.Name; row["Desc"] = land.Description; row["OwnerUUID"] = land.OwnerID.ToString(); - row["IsGroupOwned"] = land.IsGroupOwned; + row["IsGroupOwned"] = land.IsGroupOwned.ToString(); row["Area"] = land.Area; row["AuctionID"] = land.AuctionID; //Unemplemented row["Category"] = land.Category; //Enum OpenMetaverse.Parcel.ParcelCategory @@ -2939,6 +2942,9 @@ namespace OpenSim.Data.SQLite { return DbType.Binary; } + else if (type == typeof(Boolean)) { + return DbType.Boolean; + } else { return DbType.String; -- cgit v1.1