From be2ad79e52efb5eb543057e8e73fa601d0b91c87 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 20 Dec 2007 05:43:02 +0000 Subject: Added patch from Johan. First attempt to solve the LibSL.Packet GC problem. Works with LibSL rev>1532 --- OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs | 12 ++--- OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs | 2 +- OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs | 56 +++++++++++----------- OpenSim/Framework/Data.MSSQL/MSSQLManager.cs | 8 ++-- OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs | 12 ++--- 5 files changed, 45 insertions(+), 45 deletions(-) (limited to 'OpenSim/Framework/Data.MSSQL') diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs index e933a5b..cc0422c 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs @@ -72,7 +72,7 @@ namespace OpenSim.Framework.Data.MSSQL AssetBase asset = null; Dictionary param = new Dictionary(); - param["id"] = assetID.ToStringHyphenated(); + param["id"] = assetID.ToString(); IDbCommand result = database.Query("SELECT * FROM assets WHERE id = @id", param); IDataReader reader = result.ExecuteReader(); @@ -105,8 +105,8 @@ namespace OpenSim.Framework.Data.MSSQL { //SqlParameter p = cmd.Parameters.Add("id", SqlDbType.NVarChar); - //p.Value = asset.FullID.ToStringHyphenated(); - cmd.Parameters.AddWithValue("id", asset.FullID.ToStringHyphenated()); + //p.Value = asset.FullID.ToString(); + cmd.Parameters.AddWithValue("id", asset.FullID.ToString()); cmd.Parameters.AddWithValue("name", asset.Name); cmd.Parameters.AddWithValue("description", asset.Description); SqlParameter e = cmd.Parameters.Add("assetType", SqlDbType.TinyInt); @@ -145,7 +145,7 @@ namespace OpenSim.Framework.Data.MSSQL "temporary = @temporary," + "data = @data where " + "id = @keyId;", database.getConnection()); - SqlParameter param1 = new SqlParameter("@id", asset.FullID.ToStringHyphenated()); + SqlParameter param1 = new SqlParameter("@id", asset.FullID.ToString()); SqlParameter param2 = new SqlParameter("@name", asset.Name); SqlParameter param3 = new SqlParameter("@description", asset.Description); SqlParameter param4 = new SqlParameter("@assetType", asset.Type); @@ -153,7 +153,7 @@ namespace OpenSim.Framework.Data.MSSQL SqlParameter param6 = new SqlParameter("@local", asset.Local); SqlParameter param7 = new SqlParameter("@temporary", asset.Temporary); SqlParameter param8 = new SqlParameter("@data", asset.Data); - SqlParameter param9 = new SqlParameter("@keyId", asset.FullID.ToStringHyphenated()); + SqlParameter param9 = new SqlParameter("@keyId", asset.FullID.ToString()); command.Parameters.Add(param1); command.Parameters.Add(param2); command.Parameters.Add(param3); @@ -224,4 +224,4 @@ namespace OpenSim.Framework.Data.MSSQL #endregion } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs index 72ca0b8..72db568 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs @@ -300,7 +300,7 @@ namespace OpenSim.Framework.Data.MSSQL SHA512Managed HashProvider = new SHA512Managed(); ASCIIEncoding TextProvider = new ASCIIEncoding(); - byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); + byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge); byte[] hash = HashProvider.ComputeHash(stream); return false; } diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs index 69b53a3..3461474 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs @@ -141,7 +141,7 @@ namespace OpenSim.Framework.Data.MSSQL List items = new List(); Dictionary param = new Dictionary(); - param["parentFolderID"] = folderID.ToStringHyphenated(); + param["parentFolderID"] = folderID.ToString(); IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = @parentFolderID", param); IDataReader reader = result.ExecuteReader(); @@ -176,8 +176,8 @@ namespace OpenSim.Framework.Data.MSSQL { Dictionary param = new Dictionary(); - param["uuid"] = user.ToStringHyphenated(); - param["zero"] = LLUUID.Zero.ToStringHyphenated(); + param["uuid"] = user.ToString(); + param["zero"] = LLUUID.Zero.ToString(); IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param); IDataReader reader = result.ExecuteReader(); @@ -209,8 +209,8 @@ namespace OpenSim.Framework.Data.MSSQL lock (database) { Dictionary param = new Dictionary(); - param["uuid"] = user.ToStringHyphenated(); - param["zero"] = LLUUID.Zero.ToStringHyphenated(); + param["uuid"] = user.ToString(); + param["zero"] = LLUUID.Zero.ToString(); IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param); IDataReader reader = result.ExecuteReader(); @@ -256,7 +256,7 @@ namespace OpenSim.Framework.Data.MSSQL lock (database) { Dictionary param = new Dictionary(); - param["parentFolderID"] = parentID.ToStringHyphenated(); + param["parentFolderID"] = parentID.ToString(); IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @parentFolderID", param); @@ -328,7 +328,7 @@ namespace OpenSim.Framework.Data.MSSQL lock (database) { Dictionary param = new Dictionary(); - param["inventoryID"] = itemID.ToStringHyphenated(); + param["inventoryID"] = itemID.ToString(); IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = @inventoryID", param); IDataReader reader = result.ExecuteReader(); @@ -390,7 +390,7 @@ namespace OpenSim.Framework.Data.MSSQL lock (database) { Dictionary param = new Dictionary(); - param["uuid"] = folderID.ToStringHyphenated(); + param["uuid"] = folderID.ToString(); IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = @uuid", param); IDataReader reader = result.ExecuteReader(); @@ -424,17 +424,17 @@ namespace OpenSim.Framework.Data.MSSQL try { Dictionary param = new Dictionary(); - param["inventoryID"] = item.inventoryID.ToStringHyphenated(); - param["assetID"] = item.assetID.ToStringHyphenated(); + param["inventoryID"] = item.inventoryID.ToString(); + param["assetID"] = item.assetID.ToString(); param["assetType"] = item.assetType.ToString(); - param["parentFolderID"] = item.parentFolderID.ToStringHyphenated(); - param["avatarID"] = item.avatarID.ToStringHyphenated(); + param["parentFolderID"] = item.parentFolderID.ToString(); + param["avatarID"] = item.avatarID.ToString(); param["inventoryName"] = item.inventoryName; param["inventoryDescription"] = item.inventoryDescription; param["inventoryNextPermissions"] = item.inventoryNextPermissions.ToString(); param["inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString(); param["invType"] = Convert.ToString(item.invType); - param["creatorID"] = item.creatorsID.ToStringHyphenated(); + param["creatorID"] = item.creatorsID.ToString(); param["inventoryBasePermissions"] = Convert.ToString(item.inventoryBasePermissions); param["inventoryEveryOnePermissions"] = Convert.ToString(item.inventoryEveryOnePermissions); @@ -469,7 +469,7 @@ namespace OpenSim.Framework.Data.MSSQL "inventoryBasePermissions = @inventoryBasePermissions" + "inventoryEveryOnePermissions = @inventoryEveryOnePermissions) where " + "invenoryID = @keyInventoryID;", database.getConnection()); - SqlParameter param1 = new SqlParameter("@inventoryID", item.inventoryID.ToStringHyphenated()); + SqlParameter param1 = new SqlParameter("@inventoryID", item.inventoryID.ToString()); SqlParameter param2 = new SqlParameter("@assetID", item.assetID); SqlParameter param3 = new SqlParameter("@assetType", item.assetType); SqlParameter param4 = new SqlParameter("@parentFolderID", item.parentFolderID); @@ -482,7 +482,7 @@ namespace OpenSim.Framework.Data.MSSQL SqlParameter param11 = new SqlParameter("@creatorID", item.creatorsID); SqlParameter param12 = new SqlParameter("@inventoryBasePermissions", item.inventoryBasePermissions); SqlParameter param13 = new SqlParameter("@inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); - SqlParameter param14 = new SqlParameter("@keyInventoryID", item.inventoryID.ToStringHyphenated()); + SqlParameter param14 = new SqlParameter("@keyInventoryID", item.inventoryID.ToString()); command.Parameters.Add(param1); command.Parameters.Add(param2); command.Parameters.Add(param3); @@ -518,7 +518,7 @@ namespace OpenSim.Framework.Data.MSSQL try { Dictionary param = new Dictionary(); - param["uuid"] = itemID.ToStringHyphenated(); + param["uuid"] = itemID.ToString(); IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE inventoryID=@uuid", param); cmd.ExecuteNonQuery(); @@ -544,9 +544,9 @@ namespace OpenSim.Framework.Data.MSSQL Dictionary param = new Dictionary(); - param["folderID"] = folder.folderID.ToStringHyphenated(); - param["agentID"] = folder.agentID.ToStringHyphenated(); - param["parentFolderID"] = folder.parentID.ToStringHyphenated(); + param["folderID"] = folder.folderID.ToString(); + param["agentID"] = folder.agentID.ToString(); + param["parentFolderID"] = folder.parentID.ToString(); param["folderName"] = folder.name; param["type"] = Convert.ToString(folder.type); param["version"] = Convert.ToString(folder.version); @@ -577,13 +577,13 @@ namespace OpenSim.Framework.Data.MSSQL "type = @type," + "version = @version where " + "folderID = @keyFolderID;", database.getConnection()); - SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToStringHyphenated()); - SqlParameter param2 = new SqlParameter("@agentID", folder.agentID.ToStringHyphenated()); - SqlParameter param3 = new SqlParameter("@parentFolderID", folder.parentID.ToStringHyphenated()); + SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString()); + SqlParameter param2 = new SqlParameter("@agentID", folder.agentID.ToString()); + SqlParameter param3 = new SqlParameter("@parentFolderID", folder.parentID.ToString()); SqlParameter param4 = new SqlParameter("@folderName", folder.name); SqlParameter param5 = new SqlParameter("@type", folder.type); SqlParameter param6 = new SqlParameter("@version", folder.version); - SqlParameter param7 = new SqlParameter("@keyFolderID", folder.folderID.ToStringHyphenated()); + SqlParameter param7 = new SqlParameter("@keyFolderID", folder.folderID.ToString()); command.Parameters.Add(param1); command.Parameters.Add(param2); command.Parameters.Add(param3); @@ -614,9 +614,9 @@ namespace OpenSim.Framework.Data.MSSQL SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " + "parentFolderID = @parentFolderID," + "folderID = @keyFolderID;", database.getConnection()); - SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToStringHyphenated()); - SqlParameter param2 = new SqlParameter("@parentFolderID", folder.parentID.ToStringHyphenated()); - SqlParameter param3 = new SqlParameter("@keyFolderID", folder.folderID.ToStringHyphenated()); + SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString()); + SqlParameter param2 = new SqlParameter("@parentFolderID", folder.parentID.ToString()); + SqlParameter param3 = new SqlParameter("@keyFolderID", folder.folderID.ToString()); command.Parameters.Add(param1); command.Parameters.Add(param2); command.Parameters.Add(param3); @@ -667,7 +667,7 @@ namespace OpenSim.Framework.Data.MSSQL try { Dictionary param = new Dictionary(); - param["folderID"] = folderID.ToStringHyphenated(); + param["folderID"] = folderID.ToString(); IDbCommand cmd = database.Query("DELETE FROM inventoryfolders WHERE folderID=@folderID", param); cmd.ExecuteNonQuery(); @@ -686,7 +686,7 @@ namespace OpenSim.Framework.Data.MSSQL try { Dictionary param = new Dictionary(); - param["parentFolderID"] = folderID.ToStringHyphenated(); + param["parentFolderID"] = folderID.ToString(); IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", param); diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs index e3de8c1..b009a56 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs @@ -490,7 +490,7 @@ namespace OpenSim.Framework.Data.MSSQL parameters["regionUserURI"] = profile.regionUserURI; parameters["regionUserRecvKey"] = profile.regionUserRecvKey; parameters["regionUserSendKey"] = profile.regionUserSendKey; - parameters["regionMapTexture"] = profile.regionMapTextureID.ToStringHyphenated(); + parameters["regionMapTexture"] = profile.regionMapTextureID.ToString(); parameters["serverHttpPort"] = profile.httpPort.ToString(); parameters["serverRemotingPort"] = profile.remotingPort.ToString(); @@ -604,7 +604,7 @@ namespace OpenSim.Framework.Data.MSSQL sql += "@profileFirstText, @profileImage, @profileFirstImage);"; Dictionary parameters = new Dictionary(); - parameters["UUID"] = uuid.ToStringHyphenated(); + parameters["UUID"] = uuid.ToString(); parameters["username"] = username.ToString(); parameters["lastname"] = lastname.ToString(); parameters["passwordHash"] = passwordHash.ToString(); @@ -624,8 +624,8 @@ namespace OpenSim.Framework.Data.MSSQL parameters["profileWantDoMask"] = "0"; parameters["profileAboutText"] = ""; parameters["profileFirstText"] = ""; - parameters["profileImage"] = libsecondlife.LLUUID.Zero.ToStringHyphenated(); - parameters["profileFirstImage"] = libsecondlife.LLUUID.Zero.ToStringHyphenated(); + parameters["profileImage"] = libsecondlife.LLUUID.Zero.ToString(); + parameters["profileFirstImage"] = libsecondlife.LLUUID.Zero.ToString(); bool returnval = false; diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs index ccab57b..eac9826 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs @@ -186,7 +186,7 @@ namespace OpenSim.Framework.Data.MSSQL lock (database) { Dictionary param = new Dictionary(); - param["uuid"] = uuid.ToStringHyphenated(); + param["uuid"] = uuid.ToString(); IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = @uuid", param); IDataReader reader = result.ExecuteReader(); @@ -241,7 +241,7 @@ namespace OpenSim.Framework.Data.MSSQL lock (database) { Dictionary param = new Dictionary(); - param["uuid"] = uuid.ToStringHyphenated(); + param["uuid"] = uuid.ToString(); IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = @uuid", param); IDataReader reader = result.ExecuteReader(); @@ -321,7 +321,7 @@ namespace OpenSim.Framework.Data.MSSQL "profileImage = @profileImage," + "profileFirstImage = @profileFirstImage where " + "UUID = @keyUUUID;", database.getConnection()); - SqlParameter param1 = new SqlParameter("@uuid", user.UUID.ToStringHyphenated()); + SqlParameter param1 = new SqlParameter("@uuid", user.UUID.ToString()); SqlParameter param2 = new SqlParameter("@username", user.username); SqlParameter param3 = new SqlParameter("@lastname", user.surname); SqlParameter param4 = new SqlParameter("@passwordHash", user.passwordHash); @@ -341,9 +341,9 @@ namespace OpenSim.Framework.Data.MSSQL SqlParameter param18 = new SqlParameter("@profileWantDoMask", Convert.ToInt32(user.profileWantDoMask)); SqlParameter param19 = new SqlParameter("@profileAboutText", user.profileAboutText); SqlParameter param20 = new SqlParameter("@profileFirstText", user.profileFirstText); - SqlParameter param21 = new SqlParameter("@profileImage", libsecondlife.LLUUID.Zero.ToStringHyphenated()); - SqlParameter param22 = new SqlParameter("@profileFirstImage", libsecondlife.LLUUID.Zero.ToStringHyphenated()); - SqlParameter param23 = new SqlParameter("@keyUUUID", user.UUID.ToStringHyphenated()); + SqlParameter param21 = new SqlParameter("@profileImage", libsecondlife.LLUUID.Zero.ToString()); + SqlParameter param22 = new SqlParameter("@profileFirstImage", libsecondlife.LLUUID.Zero.ToString()); + SqlParameter param23 = new SqlParameter("@keyUUUID", user.UUID.ToString()); command.Parameters.Add(param1); command.Parameters.Add(param2); command.Parameters.Add(param3); -- cgit v1.1