From 16b6738cdadc70966a93b6d025ae469738955dcb Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 26 Sep 2008 17:25:22 +0000 Subject: * Patch from JHurliman * Updates to libomv r2243, * Remove lots of unnecessary typecasts * Improves SendWindData() Thanks jhurliman. * Will update OpenSim-libs in 10 minutes.. --- OpenSim/Data/MSSQL/MSSQLRegionData.cs | 4 ++-- OpenSim/Data/MSSQL/MSSQLUserData.cs | 2 +- OpenSim/Data/MySQL/MySQLRegionData.cs | 6 +++--- OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 12 ++++++------ OpenSim/Data/SQLite/SQLiteRegionData.cs | 10 +++++----- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs index ae94252..65f301f 100644 --- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs +++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs @@ -850,7 +850,7 @@ VALUES newData.Name = (String)row["Name"]; newData.Description = (String)row["Description"]; - newData.OwnerID = (String)row["OwnerUUID"]; + newData.OwnerID = (UUID)(String)row["OwnerUUID"]; newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); newData.Area = Convert.ToInt32(row["Area"]); newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented @@ -910,7 +910,7 @@ VALUES { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); entry.AgentID = new UUID((string)row["AccessUUID"]); - entry.Flags = (ParcelManager.AccessList)Convert.ToInt32(row["Flags"]); + entry.Flags = (AccessList)Convert.ToInt32(row["Flags"]); entry.Time = new DateTime(); return entry; } diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs index 6352cce..cbb7368 100644 --- a/OpenSim/Data/MSSQL/MSSQLUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs @@ -1052,7 +1052,7 @@ ELSE retval.LogoutTime = Convert.ToInt32(reader["logoutTime"].ToString()); // Current position - retval.Region = (string)reader["currentRegion"]; + retval.Region = (UUID)(string)reader["currentRegion"]; retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString()); Vector3 tmp_v; Vector3.TryParse((string)reader["currentPos"], out tmp_v); diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index c94e6a3..e6a9686 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -1329,10 +1329,10 @@ namespace OpenSim.Data.MySQL newData.Name = (String) row["Name"]; newData.Description = (String) row["Description"]; - newData.OwnerID = (String) row["OwnerUUID"]; + newData.OwnerID = (UUID)(String)row["OwnerUUID"]; newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); newData.Area = Convert.ToInt32(row["Area"]); - newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented + newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unimplemented newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]); //Enum libsecondlife.Parcel.ParcelCategory newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); @@ -1387,7 +1387,7 @@ namespace OpenSim.Data.MySQL { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); entry.AgentID = new UUID((string) row["AccessUUID"]); - entry.Flags = (ParcelManager.AccessList) Convert.ToInt32(row["Flags"]); + entry.Flags = (AccessList) Convert.ToInt32(row["Flags"]); entry.Time = new DateTime(); return entry; } diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index b9fda04..fe1edde 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs @@ -422,7 +422,7 @@ namespace OpenSim.Data.SQLite public List getInventoryFolders(UUID parentID) { List folders = new List(); - getInventoryFolders(ref folders, Util.ToRawUuidString(parentID)); + getInventoryFolders(ref folders, parentID); return folders; } @@ -623,10 +623,10 @@ namespace OpenSim.Data.SQLite /// this is horribly inefficient, but I don't want to ruin the overall structure of this implementation private void deleteItemsInFolder(UUID folderId) { - List items = getInventoryInFolder(Util.ToRawUuidString(folderId)); + List items = getInventoryInFolder(folderId); foreach (InventoryItemBase i in items) - deleteInventoryItem(Util.ToRawUuidString(i.ID)); + deleteInventoryItem(i.ID); } /// @@ -667,7 +667,7 @@ namespace OpenSim.Data.SQLite { lock (ds) { - List subFolders = getFolderHierarchy(Util.ToRawUuidString(folderID)); + List subFolders = getFolderHierarchy(folderID); DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; DataRow inventoryRow; @@ -678,7 +678,7 @@ namespace OpenSim.Data.SQLite inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(f.ID)); if (inventoryRow != null) { - deleteItemsInFolder(Util.ToRawUuidString(f.ID)); + deleteItemsInFolder(f.ID); inventoryRow.Delete(); } } @@ -687,7 +687,7 @@ namespace OpenSim.Data.SQLite inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(folderID)); if (inventoryRow != null) { - deleteItemsInFolder(Util.ToRawUuidString(folderID)); + deleteItemsInFolder(folderID); inventoryRow.Delete(); } diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 7eeefbd..157a4b8 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs @@ -258,7 +258,7 @@ namespace OpenSim.Data.SQLite { DataTable regionsettings = ds.Tables["regionsettings"]; - DataRow settingsRow = regionsettings.Rows.Find(rs.RegionUUID.ToString()); + DataRow settingsRow = regionsettings.Rows.Find(Util.ToRawUuidString(rs.RegionUUID)); if (settingsRow == null) { settingsRow = regionsettings.NewRow(); @@ -439,7 +439,7 @@ namespace OpenSim.Data.SQLite group.AddPart(prim); group.RootPart = prim; - createdObjects.Add(Util.ToRawUuidString(group.UUID), group); + createdObjects.Add(group.UUID, group); retvals.Add(group); } else @@ -1268,7 +1268,7 @@ namespace OpenSim.Data.SQLite newData.Name = (String) row["Name"]; newData.Description = (String) row["Desc"]; - newData.OwnerID = (String) row["OwnerUUID"]; + newData.OwnerID = (UUID)(String) row["OwnerUUID"]; newData.IsGroupOwned = (Boolean) row["IsGroupOwned"]; newData.Area = Convert.ToInt32(row["Area"]); newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented @@ -1288,7 +1288,7 @@ namespace OpenSim.Data.SQLite newData.MusicURL = (String) row["MusicURL"]; newData.PassHours = Convert.ToSingle(row["PassHours"]); newData.PassPrice = Convert.ToInt32(row["PassPrice"]); - newData.SnapshotID = (String) row["SnapshotUUID"]; + newData.SnapshotID = (UUID)(String) row["SnapshotUUID"]; try { @@ -1365,7 +1365,7 @@ namespace OpenSim.Data.SQLite { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); entry.AgentID = new UUID((string) row["AccessUUID"]); - entry.Flags = (ParcelManager.AccessList) row["Flags"]; + entry.Flags = (AccessList) row["Flags"]; entry.Time = new DateTime(); return entry; } -- cgit v1.1