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/AgentInventory.cs | 6 +- .../Communications/Cache/AssetServerBase.cs | 2 +- .../Communications/Cache/AssetTransactions.cs | 4 +- .../Communications/Cache/LibraryRootFolder.cs | 6 +- .../Framework/Communications/Capabilities/Caps.cs | 4 +- .../Framework/Communications/Capabilities/LLSD.cs | 4 +- OpenSim/Framework/Communications/LoginResponse.cs | 8 +-- OpenSim/Framework/Communications/LoginService.cs | 16 ++--- OpenSim/Framework/Data.DB4o/DB4oGridData.cs | 2 +- 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 ++-- OpenSim/Framework/Data.MySQL/MySQLGridData.cs | 4 +- OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | 42 ++++++------- OpenSim/Framework/Data.MySQL/MySQLManager.cs | 10 ++-- OpenSim/Framework/Data.MySQL/MySQLUserData.cs | 4 +- OpenSim/Framework/Data.SQLite/SQLiteGridData.cs | 4 +- OpenSim/Framework/RegionInfo.cs | 8 +-- OpenSim/Framework/Util.cs | 2 +- OpenSim/Grid/AssetServer/Main.cs | 2 +- OpenSim/Grid/GridServer/GridManager.cs | 12 ++-- .../Grid/InventoryServer/GridInventoryService.cs | 12 ++-- OpenSim/Grid/InventoryServer/InventoryManager.cs | 4 +- .../Compiler/Server_API/LSL_BuiltIn_Commands.cs | 14 ++--- OpenSim/Grid/UserServer/UserLoginService.cs | 8 +-- OpenSim/Grid/UserServer/UserManager.cs | 12 ++-- OpenSim/Region/ClientStack/ClientView.cs | 37 +++++++----- .../Region/ClientStack/RegionApplicationBase.cs | 2 +- OpenSim/Region/ClientStack/UDPServer.cs | 65 ++++++++++++++++++++- .../Communications/Local/LocalBackEndServices.cs | 2 +- .../Communications/Local/LocalLoginService.cs | 10 ++-- .../Region/Communications/OGS1/OGS1GridServices.cs | 6 +- .../Communications/OGS1/OGS1InventoryService.cs | 2 +- .../Region/Communications/OGS1/OGS1UserServices.cs | 2 +- .../Region/Environment/Scenes/Scene.Inventory.cs | 2 +- OpenSim/Region/Environment/Scenes/Scene.cs | 11 ++-- .../Region/Environment/Scenes/SceneObjectPart.cs | 22 +++---- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 6 +- .../Engines/CSharp/Examples/ExportRegionToLSL.cs | 4 +- .../Compiler/Server_API/LSL_BuiltIn_Commands.cs | 36 ++++-------- bin/libsecondlife.dll | Bin 1501184 -> 1649152 bytes 43 files changed, 270 insertions(+), 217 deletions(-) diff --git a/OpenSim/Framework/AgentInventory.cs b/OpenSim/Framework/AgentInventory.cs index ed8d294..541bc27 100644 --- a/OpenSim/Framework/AgentInventory.cs +++ b/OpenSim/Framework/AgentInventory.cs @@ -139,8 +139,8 @@ namespace OpenSim.Framework { InventoryItem Item = InventoryItems[itemID]; Item.AssetID = asset.FullID; - System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated() + - " so it now is set to asset " + asset.FullID.ToStringHyphenated()); + System.Console.WriteLine("updated inventory item " + itemID.ToString() + + " so it now is set to asset " + asset.FullID.ToString()); //TODO need to update the rest of the info } return true; @@ -154,7 +154,7 @@ namespace OpenSim.Framework System.Console.WriteLine("changing name to " + Util.FieldToString(packet.Name)); InventoryItem Item = InventoryItems[itemID]; Item.Name = Util.FieldToString(packet.Name); - System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated()); + System.Console.WriteLine("updated inventory item " + itemID.ToString()); //TODO need to update the rest of the info } return true; diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index 4d03fee..f5ebab7 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs @@ -232,7 +232,7 @@ namespace OpenSim.Framework.Communications.Cache for (int i = 0; i < source.Configs.Count; i++) { // System.Console.WriteLine("loading asset into database"); - string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated()); + string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToString()); string name = source.Configs[i].GetString("name", ""); sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0); sbyte invType = (sbyte) source.Configs[i].GetInt("inventoryType", 0); diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs index 51b80e5..57c1fa6 100644 --- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs +++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs @@ -355,7 +355,7 @@ namespace OpenSim.Framework.Communications.Cache LLUUID inventoryItemID = this.inventoryItemID; string text = ""; LLSDAssetUploadComplete complete = new LLSDAssetUploadComplete(); - complete.new_asset = newAssetID.ToStringHyphenated(); + complete.new_asset = newAssetID.ToString(); complete.new_inventory_item = inventoryItemID; complete.state = "complete"; text = LLSDHelpers.SerialiseLLSDReply(complete); @@ -408,7 +408,7 @@ namespace OpenSim.Framework.Communications.Cache LLUUID inventoryItemID = this.inventoryItemID; string text = ""; LLSDAssetUploadComplete complete = new LLSDAssetUploadComplete(); - complete.new_asset = newAssetID.ToStringHyphenated(); + complete.new_asset = newAssetID.ToString(); complete.new_inventory_item = inventoryItemID; complete.state = "complete"; text = LLSDHelpers.SerialiseLLSDReply(complete); diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index fdb2afe..ffc94bf 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs @@ -144,8 +144,8 @@ namespace OpenSim.Framework.Communications.Cache item.avatarID = libOwner; item.creatorsID = libOwner; item.inventoryID = - new LLUUID(source.Configs[i].GetString("inventoryID", LLUUID.Random().ToStringHyphenated())); - item.assetID = new LLUUID(source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated())); + new LLUUID(source.Configs[i].GetString("inventoryID", LLUUID.Random().ToString())); + item.assetID = new LLUUID(source.Configs[i].GetString("assetID", LLUUID.Random().ToString())); item.inventoryDescription = source.Configs[i].GetString("description", ""); item.inventoryName = source.Configs[i].GetString("name", ""); item.assetType = source.Configs[i].GetInt("assetType", 0); @@ -167,4 +167,4 @@ namespace OpenSim.Framework.Communications.Cache } } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index e439ed8..eb678a0 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -421,7 +421,7 @@ namespace OpenSim.Region.Capabilities LLUUID inv = inventoryItemID; string res = ""; LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); - uploadComplete.new_asset = newAssetID.ToStringHyphenated(); + uploadComplete.new_asset = newAssetID.ToString(); uploadComplete.new_inventory_item = inv; uploadComplete.state = "complete"; @@ -489,7 +489,7 @@ namespace OpenSim.Region.Capabilities assetID = OnUpLoad(inv, data); } - uploadComplete.new_asset = assetID.ToStringHyphenated(); + uploadComplete.new_asset = assetID.ToString(); uploadComplete.new_inventory_item = inv; uploadComplete.state = "complete"; diff --git a/OpenSim/Framework/Communications/Capabilities/LLSD.cs b/OpenSim/Framework/Communications/Capabilities/LLSD.cs index ea8ee9d..987d6e6 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSD.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSD.cs @@ -159,7 +159,7 @@ namespace OpenSim.Region.Capabilities { LLUUID u = (LLUUID)obj; writer.WriteStartElement(String.Empty, "uuid", String.Empty); - writer.WriteString(u.ToStringHyphenated()); + writer.WriteString(u.ToString()); writer.WriteEndElement(); } else if (obj is Hashtable) @@ -475,7 +475,7 @@ namespace OpenSim.Region.Capabilities } else if (obj is LLUUID) { - return GetSpaces(indent) + "- uuid " + ((LLUUID)obj).ToStringHyphenated() + Environment.NewLine; + return GetSpaces(indent) + "- uuid " + ((LLUUID)obj).ToString() + Environment.NewLine; } else if (obj is Hashtable) { diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs index bce518b..ede3148 100644 --- a/OpenSim/Framework/Communications/LoginResponse.cs +++ b/OpenSim/Framework/Communications/LoginResponse.cs @@ -266,9 +266,9 @@ namespace OpenSim.Framework.UserManagement responseData["sim_port"] = (Int32) SimPort; responseData["sim_ip"] = SimAddress; - responseData["agent_id"] = AgentID.ToStringHyphenated(); - responseData["session_id"] = SessionID.ToStringHyphenated(); - responseData["secure_session_id"] = SecureSessionID.ToStringHyphenated(); + responseData["agent_id"] = AgentID.ToString(); + responseData["session_id"] = SessionID.ToString(); + responseData["secure_session_id"] = SecureSessionID.ToString(); responseData["circuit_code"] = CircuitCode; responseData["seconds_since_epoch"] = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; responseData["login-flags"] = loginFlags; @@ -585,7 +585,7 @@ namespace OpenSim.Framework.UserManagement Hashtable hTable = new Hashtable(); hTable["buddy_rights_has"] = BuddyRightsHave; hTable["buddy_rights_given"] = BuddyRightsGiven; - hTable["buddy_id"] = BuddyID.ToStringHyphenated(); + hTable["buddy_id"] = BuddyID.ToString(); return hTable; } } diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 7012602..58dab9b 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs @@ -126,7 +126,7 @@ namespace OpenSim.Framework.UserManagement ArrayList AgentInventoryArray = inventData.InventoryArray; Hashtable InventoryRootHash = new Hashtable(); - InventoryRootHash["folder_id"] = inventData.RootFolderID.ToStringHyphenated(); + InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString(); ArrayList InventoryRoot = new ArrayList(); InventoryRoot.Add(InventoryRootHash); userProfile.rootInventoryFolderID = inventData.RootFolderID; @@ -136,9 +136,9 @@ namespace OpenSim.Framework.UserManagement logResponse.Lastname = userProfile.surname; logResponse.Firstname = userProfile.username; - logResponse.AgentID = agentID.ToStringHyphenated(); - logResponse.SessionID = userProfile.currentAgent.sessionID.ToStringHyphenated(); - logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToStringHyphenated(); + logResponse.AgentID = agentID.ToString(); + logResponse.SessionID = userProfile.currentAgent.sessionID.ToString(); + logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToString(); logResponse.InventoryRoot = InventoryRoot; logResponse.InventorySkeleton = AgentInventoryArray; logResponse.InventoryLibrary = GetInventoryLibrary(); @@ -263,7 +263,7 @@ namespace OpenSim.Framework.UserManagement //return new ArrayList(); Hashtable TempHash = new Hashtable(); TempHash["name"] = "OpenSim Library"; - TempHash["parent_id"] = LLUUID.Zero.ToStringHyphenated(); + TempHash["parent_id"] = LLUUID.Zero.ToString(); TempHash["version"] = 1; TempHash["type_default"] = -1; TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba000"; @@ -305,10 +305,10 @@ namespace OpenSim.Framework.UserManagement { TempHash = new Hashtable(); TempHash["name"] = InvFolder.FolderName; - TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); + TempHash["parent_id"] = InvFolder.ParentID.ToString(); TempHash["version"] = (Int32) InvFolder.Version; TempHash["type_default"] = (Int32) InvFolder.DefaultType; - TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); + TempHash["folder_id"] = InvFolder.FolderID.ToString(); AgentInventoryArray.Add(TempHash); } @@ -327,4 +327,4 @@ namespace OpenSim.Framework.UserManagement } } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/Data.DB4o/DB4oGridData.cs b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs index 88bd1cb..00999c2 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oGridData.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs @@ -95,7 +95,7 @@ namespace OpenSim.Framework.Data.DB4o if (manager.simProfiles.ContainsKey(uuid)) return manager.simProfiles[uuid]; } - throw new Exception("Unable to find profile with UUID (" + uuid.ToStringHyphenated() + + throw new Exception("Unable to find profile with UUID (" + uuid.ToString() + "). Total Registered Regions: " + manager.simProfiles.Count); } 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); diff --git a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs index ac3d849..7843562 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs @@ -304,7 +304,7 @@ namespace OpenSim.Framework.Data.MySQL lock (database) { Dictionary param = new Dictionary(); - param["?uuid"] = uuid.ToStringHyphenated(); + param["?uuid"] = uuid.ToString(); IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param); IDataReader reader = result.ExecuteReader(); @@ -377,7 +377,7 @@ namespace OpenSim.Framework.Data.MySQL 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.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs index 6828f66..ac0877e 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs @@ -155,7 +155,7 @@ namespace OpenSim.Framework.Data.MySQL MySqlCommand result = new MySqlCommand("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", database.Connection); - result.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); + result.Parameters.AddWithValue("?uuid", folderID.ToString()); MySqlDataReader reader = result.ExecuteReader(); while (reader.Read()) @@ -190,8 +190,8 @@ namespace OpenSim.Framework.Data.MySQL new MySqlCommand( "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", database.Connection); - result.Parameters.AddWithValue("?uuid", user.ToStringHyphenated()); - result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToStringHyphenated()); + result.Parameters.AddWithValue("?uuid", user.ToString()); + result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString()); MySqlDataReader reader = result.ExecuteReader(); List items = new List(); @@ -224,8 +224,8 @@ namespace OpenSim.Framework.Data.MySQL new MySqlCommand( "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", database.Connection); - result.Parameters.AddWithValue("?uuid", user.ToStringHyphenated()); - result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToStringHyphenated()); + result.Parameters.AddWithValue("?uuid", user.ToString()); + result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString()); MySqlDataReader reader = result.ExecuteReader(); @@ -275,7 +275,7 @@ namespace OpenSim.Framework.Data.MySQL MySqlCommand result = new MySqlCommand("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", database.Connection); - result.Parameters.AddWithValue("?uuid", parentID.ToStringHyphenated()); + result.Parameters.AddWithValue("?uuid", parentID.ToString()); MySqlDataReader reader = result.ExecuteReader(); List items = new List(); @@ -346,7 +346,7 @@ namespace OpenSim.Framework.Data.MySQL MySqlCommand result = new MySqlCommand("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", database.Connection); - result.Parameters.AddWithValue("?uuid", itemID.ToStringHyphenated()); + result.Parameters.AddWithValue("?uuid", itemID.ToString()); MySqlDataReader reader = result.ExecuteReader(); InventoryItemBase item = null; @@ -407,7 +407,7 @@ namespace OpenSim.Framework.Data.MySQL { MySqlCommand result = new MySqlCommand("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", database.Connection); - result.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); + result.Parameters.AddWithValue("?uuid", folderID.ToString()); MySqlDataReader reader = result.ExecuteReader(); reader.Read(); @@ -440,18 +440,18 @@ namespace OpenSim.Framework.Data.MySQL try { MySqlCommand result = new MySqlCommand(sql, database.Connection); - result.Parameters.AddWithValue("?inventoryID", item.inventoryID.ToStringHyphenated()); - result.Parameters.AddWithValue("?assetID", item.assetID.ToStringHyphenated()); + result.Parameters.AddWithValue("?inventoryID", item.inventoryID.ToString()); + result.Parameters.AddWithValue("?assetID", item.assetID.ToString()); result.Parameters.AddWithValue("?assetType", item.assetType.ToString()); - result.Parameters.AddWithValue("?parentFolderID", item.parentFolderID.ToStringHyphenated()); - result.Parameters.AddWithValue("?avatarID", item.avatarID.ToStringHyphenated()); + result.Parameters.AddWithValue("?parentFolderID", item.parentFolderID.ToString()); + result.Parameters.AddWithValue("?avatarID", item.avatarID.ToString()); result.Parameters.AddWithValue("?inventoryName", item.inventoryName); result.Parameters.AddWithValue("?inventoryDescription", item.inventoryDescription); result.Parameters.AddWithValue("?inventoryNextPermissions", item.inventoryNextPermissions.ToString()); result.Parameters.AddWithValue("?inventoryCurrentPermissions", item.inventoryCurrentPermissions.ToString()); result.Parameters.AddWithValue("?invType", item.invType); - result.Parameters.AddWithValue("?creatorID", item.creatorsID.ToStringHyphenated()); + result.Parameters.AddWithValue("?creatorID", item.creatorsID.ToString()); result.Parameters.AddWithValue("?inventoryBasePermissions", item.inventoryBasePermissions); result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); result.ExecuteNonQuery(); @@ -482,7 +482,7 @@ namespace OpenSim.Framework.Data.MySQL { MySqlCommand cmd = new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection); - cmd.Parameters.AddWithValue("?uuid", itemID.ToStringHyphenated()); + cmd.Parameters.AddWithValue("?uuid", itemID.ToString()); cmd.ExecuteNonQuery(); } catch (MySqlException e) @@ -503,9 +503,9 @@ namespace OpenSim.Framework.Data.MySQL sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)"; MySqlCommand cmd = new MySqlCommand(sql, database.Connection); - cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToStringHyphenated()); - cmd.Parameters.AddWithValue("?agentID", folder.agentID.ToStringHyphenated()); - cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToStringHyphenated()); + cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString()); + cmd.Parameters.AddWithValue("?agentID", folder.agentID.ToString()); + cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString()); cmd.Parameters.AddWithValue("?folderName", folder.name); cmd.Parameters.AddWithValue("?type", (short) folder.type); cmd.Parameters.AddWithValue("?version", folder.version); @@ -538,8 +538,8 @@ namespace OpenSim.Framework.Data.MySQL "UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID"; MySqlCommand cmd = new MySqlCommand(sql, database.Connection); - cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToStringHyphenated()); - cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToStringHyphenated()); + cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString()); + cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString()); try @@ -587,7 +587,7 @@ namespace OpenSim.Framework.Data.MySQL { MySqlCommand cmd = new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection); - cmd.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); + cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); cmd.ExecuteNonQuery(); } catch (MySqlException e) @@ -603,7 +603,7 @@ namespace OpenSim.Framework.Data.MySQL { MySqlCommand cmd = new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection); - cmd.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); + cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); cmd.ExecuteNonQuery(); } catch (MySqlException e) diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs index bd5f811..d652db8 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs @@ -549,7 +549,7 @@ namespace OpenSim.Framework.Data.MySQL 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(); @@ -569,8 +569,8 @@ namespace OpenSim.Framework.Data.MySQL parameters["?profileWantDoMask"] = "0"; parameters["?profileAboutText"] = ""; parameters["?profileFirstText"] = ""; - parameters["?profileImage"] = LLUUID.Zero.ToStringHyphenated(); - parameters["?profileFirstImage"] = LLUUID.Zero.ToStringHyphenated(); + parameters["?profileImage"] = LLUUID.Zero.ToString(); + parameters["?profileFirstImage"] = LLUUID.Zero.ToString(); bool returnval = false; @@ -618,7 +618,7 @@ namespace OpenSim.Framework.Data.MySQL parameters["?regionHandle"] = regiondata.regionHandle.ToString(); parameters["?regionName"] = regiondata.regionName.ToString(); - parameters["?uuid"] = regiondata.UUID.ToStringHyphenated(); + parameters["?uuid"] = regiondata.UUID.ToString(); parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString(); parameters["?regionSecret"] = regiondata.regionSecret.ToString(); parameters["?regionSendKey"] = regiondata.regionSendKey.ToString(); @@ -639,7 +639,7 @@ namespace OpenSim.Framework.Data.MySQL parameters["?regionUserURI"] = regiondata.regionUserURI.ToString(); parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString(); parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString(); - parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToStringHyphenated(); + parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToString(); parameters["?serverHttpPort"] = regiondata.httpPort.ToString(); parameters["?serverRemotingPort"] = regiondata.remotingPort.ToString(); diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs index 05e5127..4b86d80 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs @@ -237,7 +237,7 @@ namespace OpenSim.Framework.Data.MySQL 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(); @@ -292,7 +292,7 @@ namespace OpenSim.Framework.Data.MySQL 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(); diff --git a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs index 7269676..dddc085 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs @@ -119,7 +119,7 @@ namespace OpenSim.Framework.Data.SQLite public RegionProfileData GetProfileByLLUUID(LLUUID uuid) { Dictionary param = new Dictionary(); - param["uuid"] = uuid.ToStringHyphenated(); + param["uuid"] = uuid.ToString(); IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); IDataReader reader = result.ExecuteReader(); @@ -190,7 +190,7 @@ namespace OpenSim.Framework.Data.SQLite 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/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 6a9de2c..c4557f8 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -269,7 +269,7 @@ namespace OpenSim.Framework public void LoadFromNiniSource(IConfigSource source, string sectionName) { string errorMessage = ""; - this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToStringHyphenated())); + this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToString())); this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000")); this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); @@ -317,8 +317,8 @@ namespace OpenSim.Framework configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false); configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false); configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false); - configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Master Avatar UUID", LLUUID.Zero.ToStringHyphenated(), true); - configMember.addConfigurationOption("estate_covanant_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant", LLUUID.Zero.ToStringHyphenated(), true); + configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Master Avatar UUID", LLUUID.Zero.ToString(), true); + configMember.addConfigurationOption("estate_covanant_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant", LLUUID.Zero.ToString(), true); configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false,(ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); @@ -326,7 +326,7 @@ namespace OpenSim.Framework public bool shouldMasterAvatarDetailsBeAsked(string configuration_key) { - if (MasterAvatarAssignedUUID.Equals(null) || MasterAvatarAssignedUUID.ToStringHyphenated() == LLUUID.Zero.ToStringHyphenated()) + if (MasterAvatarAssignedUUID.Equals(null) || MasterAvatarAssignedUUID.ToString() == LLUUID.Zero.ToString()) { return true; } diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 740f527..db841cf 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -152,7 +152,7 @@ namespace OpenSim.Framework public static string GetRandomCapsPath() { LLUUID caps = LLUUID.Random(); - string capsPath = caps.ToStringHyphenated(); + string capsPath = caps.ToString(); capsPath = capsPath.Remove(capsPath.Length - 4, 4); return capsPath; } diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index aa34e38..c4e8e64 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs @@ -206,7 +206,7 @@ namespace OpenSim.Grid.AssetServer for (int i = 0; i < source.Configs.Count; i++) { - string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated()); + string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToString()); string name = source.Configs[i].GetString("name", ""); sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0); sbyte invType = (sbyte) source.Configs[i].GetInt("inventoryType", 0); diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 8544742..09cbe7f 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs @@ -234,7 +234,7 @@ namespace OpenSim.Grid.GridServer { TheSim = getRegion(new LLUUID((string) requestData["UUID"])); -// logToDB((new LLUUID((string)requestData["UUID"])).ToStringHyphenated(),"XmlRpcSimulatorLoginMethod","", 5,"Region attempting login with UUID."); +// logToDB((new LLUUID((string)requestData["UUID"])).ToString(),"XmlRpcSimulatorLoginMethod","", 5,"Region attempting login with UUID."); } else if (requestData.ContainsKey("region_handle")) { @@ -316,7 +316,7 @@ namespace OpenSim.Grid.GridServer catch (Exception e) { MainLog.Instance.Warn("storage", - "Unable to add region " + TheSim.UUID.ToStringHyphenated() + " via " + kvp.Key); + "Unable to add region " + TheSim.UUID.ToString() + " via " + kvp.Key); MainLog.Instance.Warn("storage", e.ToString()); } @@ -502,7 +502,7 @@ namespace OpenSim.Grid.GridServer simProfileBlock["sim_ip"] = aSim.Value.serverIP.ToString(); simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString(); simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString(); - simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated(); + simProfileBlock["uuid"] = aSim.Value.UUID.ToString(); simProfileBlock["remoting_port"] = aSim.Value.remotingPort; simProfileList.Add(simProfileBlock); @@ -529,14 +529,14 @@ namespace OpenSim.Grid.GridServer simProfileBlock["region-flags"] = 0; simProfileBlock["water-height"] = 20; simProfileBlock["agents"] = 1; - simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToStringHyphenated(); + simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToString(); // For Sugilite compatibility simProfileBlock["regionhandle"] = simProfile.regionHandle.ToString(); simProfileBlock["sim_ip"] = simProfile.serverIP.ToString(); simProfileBlock["sim_port"] = simProfile.serverPort.ToString(); simProfileBlock["sim_uri"] = simProfile.serverURI.ToString(); - simProfileBlock["uuid"] = simProfile.UUID.ToStringHyphenated(); + simProfileBlock["uuid"] = simProfile.UUID.ToString(); simProfileList.Add(simProfileBlock); } @@ -721,7 +721,7 @@ namespace OpenSim.Grid.GridServer { kvp.Value.AddProfile(TheSim); MainLog.Instance.Verbose("grid", "New sim added to grid (" + TheSim.regionName + ")"); - logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, + logToDB(TheSim.UUID.ToString(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid."); } else diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index 150a262..04d4131 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs @@ -108,7 +108,7 @@ namespace OpenSim.Grid.InventoryServer { LLUUID userID = new LLUUID(rawUserID); - MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToStringHyphenated()); + MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToString()); InventoryCollection invCollection = new InventoryCollection(); List folders; @@ -127,7 +127,7 @@ namespace OpenSim.Grid.InventoryServer LLUUID userID = new LLUUID(rawUserID); MainLog.Instance.Verbose( - "INVENTORY", "Creating new set of inventory folders for " + userID.ToStringHyphenated()); + "INVENTORY", "Creating new set of inventory folders for " + userID.ToString()); CreateNewUserInventory(userID); return true; @@ -154,7 +154,7 @@ namespace OpenSim.Grid.InventoryServer // Right now, this actions act more like an update/insert combination than a simple create. MainLog.Instance.Verbose( "INVENTORY", - "Updating in " + folder.parentID.ToStringHyphenated() + "Updating in " + folder.parentID.ToString() + ", folder " + folder.name); AddNewInventoryFolder(folder.agentID, folder); @@ -166,7 +166,7 @@ namespace OpenSim.Grid.InventoryServer MainLog.Instance.Verbose( "INVENTORY", "Moving folder " + folder.folderID - + " to " + folder.parentID.ToStringHyphenated()); + + " to " + folder.parentID.ToString()); MoveExistingInventoryFolder(folder); return true; @@ -177,7 +177,7 @@ namespace OpenSim.Grid.InventoryServer // Right now, this actions act more like an update/insert combination than a simple create. MainLog.Instance.Verbose( "INVENTORY", - "Updating in " + item.parentFolderID.ToStringHyphenated() + "Updating in " + item.parentFolderID.ToString() + ", item " + item.inventoryName); AddNewInventoryItem(item.avatarID, item); @@ -189,7 +189,7 @@ namespace OpenSim.Grid.InventoryServer // extra spaces to align with other inventory messages MainLog.Instance.Verbose( "INVENTORY", - "Deleting in " + item.parentFolderID.ToStringHyphenated() + "Deleting in " + item.parentFolderID.ToString() + ", item " + item.inventoryName); DeleteItem(item); diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs index f3a45c6..1070bcf 100644 --- a/OpenSim/Grid/InventoryServer/InventoryManager.cs +++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs @@ -164,13 +164,13 @@ namespace OpenSim.Grid.InventoryServer private byte[] GetUserInventory(LLUUID userID) { - MainLog.Instance.Notice(OpenInventory_Main.LogName, "Getting Inventory for user {0}", userID.ToStringHyphenated()); + MainLog.Instance.Notice(OpenInventory_Main.LogName, "Getting Inventory for user {0}", userID.ToString()); byte[] result = new byte[] { }; InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID); if (fb == null) { - MainLog.Instance.Notice(OpenInventory_Main.LogName, "Inventory not found for user {0}, creating new", userID.ToStringHyphenated()); + MainLog.Instance.Notice(OpenInventory_Main.LogName, "Inventory not found for user {0}, creating new", userID.ToString()); CreateDefaultInventory(userID); } diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 64921d7..8f58b55 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs @@ -820,7 +820,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler public string llGetOwner() { - return m_host.ObjectOwner.ToStringHyphenated(); + return m_host.ObjectOwner.ToString(); } public void llInstantMessage(string user, string message) @@ -840,7 +840,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler public string llGetKey() { - return m_host.UUID.ToStringHyphenated(); + return m_host.UUID.ToString(); } public void llSetBuoyancy(double buoyancy) @@ -1234,7 +1234,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler public string llList2Key(List src, int index) { - //return OpenSim.Framework.ToStringHyphenated(src[index]); + //return OpenSim.Framework.ToString(src[index]); return src[index].ToString(); } @@ -1923,7 +1923,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler public string llGetCreator() { - return m_host.ObjectCreator.ToStringHyphenated(); + return m_host.ObjectCreator.ToString(); } public string llGetTimestamp() @@ -2265,14 +2265,14 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, extraParams, timer); - return createdTexture.ToStringHyphenated(); + return createdTexture.ToString(); } else { //TODO update existing dynamic textures } - return LLUUID.Zero.ToStringHyphenated(); + return LLUUID.Zero.ToString(); } private void NotImplemented(string Command) @@ -2281,4 +2281,4 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler throw new NotImplementedException("Command not implemented: " + Command); } } -} \ No newline at end of file +} diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index c5c0d02..9b9360d 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -246,10 +246,10 @@ namespace OpenSim.Grid.UserServer } TempHash = new Hashtable(); TempHash["name"] = InvFolder.name; - TempHash["parent_id"] = InvFolder.parentID.ToStringHyphenated(); + TempHash["parent_id"] = InvFolder.parentID.ToString(); TempHash["version"] = (Int32)InvFolder.version; TempHash["type_default"] = (Int32)InvFolder.type; - TempHash["folder_id"] = InvFolder.folderID.ToStringHyphenated(); + TempHash["folder_id"] = InvFolder.folderID.ToString(); AgentInventoryArray.Add(TempHash); } return new InventoryData(AgentInventoryArray, rootID); @@ -268,10 +268,10 @@ namespace OpenSim.Grid.UserServer { TempHash = new Hashtable(); TempHash["name"] = InvFolder.FolderName; - TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); + TempHash["parent_id"] = InvFolder.ParentID.ToString(); TempHash["version"] = (Int32)InvFolder.Version; TempHash["type_default"] = (Int32)InvFolder.DefaultType; - TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); + TempHash["folder_id"] = InvFolder.FolderID.ToString(); AgentInventoryArray.Add(TempHash); } diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index a697e91..9b5af0f 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -76,12 +76,12 @@ namespace OpenSim.Grid.UserServer XmlRpcResponse response = new XmlRpcResponse(); Hashtable responseData = new Hashtable(); // Query Result Information - responseData["queryid"] = (string)queryID.ToStringHyphenated(); + responseData["queryid"] = (string)queryID.ToString(); responseData["avcount"] = (string)returnUsers.Count.ToString(); for (int i = 0; i < returnUsers.Count; i++) { - responseData["avatarid" + i.ToString()] = returnUsers[i].AvatarID.ToStringHyphenated(); + responseData["avatarid" + i.ToString()] = returnUsers[i].AvatarID.ToString(); responseData["firstname" + i.ToString()] = returnUsers[i].firstName; responseData["lastname" + i.ToString()] = returnUsers[i].lastName; } @@ -102,17 +102,17 @@ namespace OpenSim.Grid.UserServer // Account information responseData["firstname"] = profile.username; responseData["lastname"] = profile.surname; - responseData["uuid"] = profile.UUID.ToStringHyphenated(); + responseData["uuid"] = profile.UUID.ToString(); // Server Information responseData["server_inventory"] = profile.userInventoryURI; responseData["server_asset"] = profile.userAssetURI; // Profile Information responseData["profile_about"] = profile.profileAboutText; responseData["profile_firstlife_about"] = profile.profileFirstText; - responseData["profile_firstlife_image"] = profile.profileFirstImage.ToStringHyphenated(); + responseData["profile_firstlife_image"] = profile.profileFirstImage.ToString(); responseData["profile_can_do"] = profile.profileCanDoMask.ToString(); responseData["profile_want_do"] = profile.profileWantDoMask.ToString(); - responseData["profile_image"] = profile.profileImage.ToStringHyphenated(); + responseData["profile_image"] = profile.profileImage.ToString(); responseData["profile_created"] = profile.created.ToString(); responseData["profile_lastlogin"] = profile.lastLogin.ToString(); // Home region information @@ -137,7 +137,7 @@ namespace OpenSim.Grid.UserServer XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; List returnAvatar = new List(); - LLUUID queryID = new LLUUID(LLUUID.Zero.ToStringHyphenated()); + LLUUID queryID = new LLUUID(LLUUID.Zero.ToString()); if (requestData.Contains("avquery") && requestData.Contains("queryid")) { diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 75c4187..58cb9a2 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -535,7 +535,7 @@ namespace OpenSim.Region.ClientStack /// public void SendRegionHandshake(RegionInfo regionInfo) { - RegionHandshakePacket handshake = new RegionHandshakePacket(); + RegionHandshakePacket handshake = (RegionHandshakePacket) PacketPool.Instance.GetPacket(PacketType.RegionHandshake); handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor; handshake.RegionInfo.IsEstateManager = false; @@ -2187,17 +2187,22 @@ namespace OpenSim.Region.ClientStack // Actually make the byte array and send it try { - byte[] sendbuffer = Pack.ToBytes(); - if (Pack.Header.Zerocoded) - { - byte[] ZeroOutBuffer = new byte[4096]; - int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); - m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, m_circuitCode); - } - else - { - m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode); - } + byte[] sendbuffer = Pack.ToBytes(); + if (Pack is RegionHandshakePacket) + { + PacketPool.Instance.ReturnPacket(Pack); + } + + if (Pack.Header.Zerocoded) + { + byte[] ZeroOutBuffer = new byte[4096]; + int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); + m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, m_circuitCode); + } + else + { + m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode); + } } catch (Exception e) { @@ -2801,7 +2806,7 @@ namespace OpenSim.Region.ClientStack case PacketType.AssetUploadRequest: AssetUploadRequestPacket request = (AssetUploadRequestPacket) Pack; // Console.WriteLine("upload request " + Pack.ToString()); - // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToStringHyphenated()); + // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString()); if (OnAssetUploadRequest != null) { LLUUID temp=libsecondlife.LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); @@ -2928,7 +2933,7 @@ namespace OpenSim.Region.ClientStack AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId)); if (asset != null) { - // Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToStringHyphenated() + " already in cache"); + // Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToString() + " already in cache"); m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); } else @@ -2936,7 +2941,7 @@ namespace OpenSim.Region.ClientStack asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID); if (asset != null) { - //Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToStringHyphenated() + " to cache"); + //Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToString() + " to cache"); m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); } else @@ -3351,6 +3356,8 @@ namespace OpenSim.Region.ClientStack #endregion } } + + PacketPool.Instance.ReturnPacket(Pack); } private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 51155ac..f20b132 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -134,7 +134,7 @@ namespace OpenSim.Region.ClientStack if (masterAvatar != null) { - m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]"); + m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToString() + "]"); scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; } else diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index f91e5e2..5cad041 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs @@ -26,6 +26,7 @@ * */ using System; +using System.Collections; using System.Collections.Generic; using System.Net; using System.Net.Sockets; @@ -36,6 +37,68 @@ using OpenSim.Framework.Console; namespace OpenSim.Region.ClientStack { + public sealed class PacketPool + { + // Set up a thread-safe singleton pattern + static PacketPool() + { + } + + static readonly PacketPool instance = new PacketPool(); + + public static PacketPool Instance + { + get + { + return instance; + } + } + + private Hashtable pool = new Hashtable(); + + public Packet GetPacket(PacketType type) { + Packet packet = null; + + lock(pool) + { + if(pool[type] == null || ((Stack) pool[type]).Count == 0) + { + // Creating a new packet if we cannot reuse an old package + packet = Packet.BuildPacket(type); + } + else + { + // Recycle old packages + packet=(Packet) ((Stack) pool[type]).Pop(); + } + } + + return packet; + } + + public Packet GetPacket(byte[] bytes, ref int packetEnd, byte[] zeroBuffer) { + Packet packet = GetPacket(Packet.GetType(bytes, packetEnd, zeroBuffer)); + + int i = 0; + packet.FromBytes(bytes, ref i, ref packetEnd, zeroBuffer); + return packet; + } + + public void ReturnPacket(Packet packet) { + lock(pool) + { + PacketType type=packet.Type; + + if(pool[type] == null) + { + pool[type] = new Stack(); + } + + ((Stack) pool[type]).Push(packet); + } + } + } + public class UDPServer : ClientStackNetworkHandler { protected Dictionary clientCircuits = new Dictionary(); @@ -194,7 +257,7 @@ namespace OpenSim.Region.ClientStack try { - packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer); + packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer); } catch(Exception) { diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 0ec7c99..f57de1c 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -374,7 +374,7 @@ namespace OpenSim.Region.Communications.Local regData["status"] = "active"; regData["handle"] = region.ToString(); - respData[reg.RegionID.ToStringHyphenated()] = regData; + respData[reg.RegionID.ToString()] = regData; } } diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 37cea1f..2c08707 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -177,10 +177,10 @@ namespace OpenSim.Region.Communications.Local } TempHash = new Hashtable(); TempHash["name"] = InvFolder.name; - TempHash["parent_id"] = InvFolder.parentID.ToStringHyphenated(); + TempHash["parent_id"] = InvFolder.parentID.ToString(); TempHash["version"] = (Int32) InvFolder.version; TempHash["type_default"] = (Int32) InvFolder.type; - TempHash["folder_id"] = InvFolder.folderID.ToStringHyphenated(); + TempHash["folder_id"] = InvFolder.folderID.ToString(); AgentInventoryArray.Add(TempHash); } return new InventoryData(AgentInventoryArray, rootID); @@ -196,10 +196,10 @@ namespace OpenSim.Region.Communications.Local { TempHash = new Hashtable(); TempHash["name"] = InvFolder.FolderName; - TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); + TempHash["parent_id"] = InvFolder.ParentID.ToString(); TempHash["version"] = (Int32) InvFolder.Version; TempHash["type_default"] = (Int32) InvFolder.DefaultType; - TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); + TempHash["folder_id"] = InvFolder.FolderID.ToString(); AgentInventoryArray.Add(TempHash); } @@ -207,4 +207,4 @@ namespace OpenSim.Region.Communications.Local } } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index fbb83fc..060fe28 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -103,7 +103,7 @@ namespace OpenSim.Region.Communications.OGS1 // Login / Authentication GridParams["authkey"] = serversInfo.GridSendKey; - GridParams["UUID"] = regionInfo.RegionID.ToStringHyphenated(); + GridParams["UUID"] = regionInfo.RegionID.ToString(); GridParams["sim_ip"] = regionInfo.ExternalHostName; GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); @@ -111,7 +111,7 @@ namespace OpenSim.Region.Communications.OGS1 GridParams["sim_name"] = regionInfo.RegionName; GridParams["http_port"] = serversInfo.HttpListenerPort.ToString(); GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString(); - GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToStringHyphenated(); + GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString(); // Package into an XMLRPC Request ArrayList SendParams = new ArrayList(); @@ -191,7 +191,7 @@ namespace OpenSim.Region.Communications.OGS1 { RegionInfo regionInfo; Hashtable requestData = new Hashtable(); - requestData["region_UUID"] = Region_UUID.ToStringHyphenated(); + requestData["region_UUID"] = Region_UUID.ToString(); requestData["authkey"] = serversInfo.GridSendKey; ArrayList SendParams = new ArrayList(); SendParams.Add(requestData); diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 709a227..6c1f77e 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -63,7 +63,7 @@ namespace OpenSim.Region.Communications.OGS1 { try { - Console.WriteLine("Requesting Inventory from Inventory server ( " + _inventoryServerUrl + "/GetInventory/" +" ) for " + userID.ToStringHyphenated()); + Console.WriteLine("Requesting Inventory from Inventory server ( " + _inventoryServerUrl + "/GetInventory/" +" ) for " + userID.ToString()); RestObjectPosterResponse requester = new RestObjectPosterResponse(); requester.ResponseCallback = InventoryResponse; diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index d26da90..c1e6ba6 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -118,7 +118,7 @@ namespace OpenSim.Region.Communications.OGS1 try { Hashtable param = new Hashtable(); - param["queryid"] = (string)queryID.ToStringHyphenated(); + param["queryid"] = (string)queryID.ToString(); param["avquery"] = objAlphaNumericPattern.Replace(query, ""); IList parameters = new ArrayList(); parameters.Add(param); diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 9821906..753d0cf 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -241,7 +241,7 @@ namespace OpenSim.Region.Environment.Scenes { MainLog.Instance.Verbose( "INVENTORY", - "Moving item for " + remoteClient.AgentId.ToStringHyphenated()); + "Moving item for " + remoteClient.AgentId.ToString()); CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); if (userInfo == null) diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 474d8d5..01d6c5a 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Scenes protected SceneCommunicationService m_sceneGridService; protected SceneXmlLoader m_sceneXmlLoader; - protected Dictionary m_capsHandlers = new Dictionary(); + protected Dictionary m_capsHandlers = new Dictionary(); protected BaseHttpServer httpListener; protected Dictionary Modules = new Dictionary(); @@ -990,6 +990,7 @@ namespace OpenSim.Region.Environment.Scenes } } +/* Tree has been removed from libSL public void AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, libsecondlife.ObjectManager.Tree treeType, bool newTree) { @@ -1001,7 +1002,7 @@ namespace OpenSim.Region.Environment.Scenes treeShape.State = (byte)treeType; AddNewPrim(LLUUID.Random(), position, rotation, treeShape); } - +*/ public void RemovePrim(uint localID, LLUUID avatar_deleter) { m_innerScene.RemovePrim(localID, avatar_deleter); @@ -1323,8 +1324,8 @@ namespace OpenSim.Region.Environment.Scenes { if (agent.CapsPath != "") { - Caps cap = - new Caps(AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port, + OpenSim.Region.Capabilities.Caps cap = + new OpenSim.Region.Capabilities.Caps(AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port, agent.CapsPath, agent.AgentID, m_dumpAssetsToFile); Util.SetCapsURL(agent.AgentID, "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() + @@ -1335,7 +1336,7 @@ namespace OpenSim.Region.Environment.Scenes if (m_capsHandlers.ContainsKey(agent.AgentID)) { //MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " + - // agent.AgentID.ToStringHyphenated()); + // agent.AgentID.ToString()); try { m_capsHandlers[agent.AgentID] = cap; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 5e5b8b5..f3be4bd 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1030,8 +1030,8 @@ namespace OpenSim.Region.Environment.Scenes foreach (TaskInventoryItem item in TaskInventory.Values) { invString.AddItemStart(); - invString.AddNameValueLine("item_id", item.item_id.ToStringHyphenated()); - invString.AddNameValueLine("parent_id", item.parent_id.ToStringHyphenated()); + invString.AddNameValueLine("item_id", item.item_id.ToString()); + invString.AddNameValueLine("parent_id", item.parent_id.ToString()); invString.AddPermissionsStart(); invString.AddNameValueLine("base_mask", "0x7FFFFFFF"); @@ -1039,13 +1039,13 @@ namespace OpenSim.Region.Environment.Scenes invString.AddNameValueLine("group_mask", "0x7FFFFFFF"); invString.AddNameValueLine("everyone_mask", "0x7FFFFFFF"); invString.AddNameValueLine("next_owner_mask", "0x7FFFFFFF"); - invString.AddNameValueLine("creator_id", item.creator_id.ToStringHyphenated()); - invString.AddNameValueLine("owner_id", item.owner_id.ToStringHyphenated()); - invString.AddNameValueLine("last_owner_id", item.last_owner_id.ToStringHyphenated()); - invString.AddNameValueLine("group_id", item.group_id.ToStringHyphenated()); + invString.AddNameValueLine("creator_id", item.creator_id.ToString()); + invString.AddNameValueLine("owner_id", item.owner_id.ToString()); + invString.AddNameValueLine("last_owner_id", item.last_owner_id.ToString()); + invString.AddNameValueLine("group_id", item.group_id.ToString()); invString.AddSectionEnd(); - invString.AddNameValueLine("asset_id", item.asset_id.ToStringHyphenated()); + invString.AddNameValueLine("asset_id", item.asset_id.ToString()); invString.AddNameValueLine("type", item.type); invString.AddNameValueLine("inv_type", item.inv_type); invString.AddNameValueLine("flags", "0x00"); @@ -1255,12 +1255,12 @@ namespace OpenSim.Region.Environment.Scenes tex.FaceTextures[i].RGBA = tmpcolor; } } - tmpcolor = tex.DefaultTexture.RGBA; + tmpcolor = tex.FaceTextures[0].RGBA; tmpcolor.A = tmpcolor.A * 255; tmpcolor.R = tmpcolor.R * 255; tmpcolor.G = tmpcolor.G * 255; tmpcolor.B = tmpcolor.B * 255; - tex.DefaultTexture.RGBA = tmpcolor; + tex.FaceTextures[0].RGBA = tmpcolor; UpdateTextureEntry(tex.ToBytes()); } @@ -1544,8 +1544,8 @@ namespace OpenSim.Region.Environment.Scenes public InventoryStringBuilder(LLUUID folderID, LLUUID parentID) { BuildString += "\tinv_object\t0\n\t{\n"; - AddNameValueLine("obj_id", folderID.ToStringHyphenated()); - AddNameValueLine("parent_id", parentID.ToStringHyphenated()); + AddNameValueLine("obj_id", folderID.ToString()); + AddNameValueLine("parent_id", parentID.ToString()); AddNameValueLine("type", "category"); AddNameValueLine("name", "Contents"); AddSectionEnd(); diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 62abefc..a221243 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -1033,11 +1033,7 @@ namespace OpenSim.Region.Environment.Scenes { LLVector3 pos = m_pos; LLVector3 vel = Velocity; - LLQuaternion rot; - rot.X = m_bodyRot.x; - rot.Y = m_bodyRot.y; - rot.Z = m_bodyRot.z; - rot.W = m_bodyRot.w; + LLQuaternion rot=new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w); remoteClient.SendAvatarTerseUpdate(m_regionHandle, 64096, LocalId, new LLVector3(pos.X, pos.Y, pos.Z), new LLVector3(vel.X, vel.Y, vel.Z), rot); } diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs index 2d684d1..09b7f48 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs @@ -56,7 +56,7 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp.Examples { SceneObject root = obj.Value; - sequence += "NEWOBJ::" + obj.Key.ToStringHyphenated() + "\n"; + sequence += "NEWOBJ::" + obj.Key.ToString() + "\n"; string rootPrim = processPrimitiveToString(root.rootPrimitive); @@ -91,4 +91,4 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp.Examples return ""; } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 832ccf1..1cb307f 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs @@ -471,11 +471,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler } else if (face == -1) { - texcolor = tex.DefaultTexture.RGBA; - texcolor.R = (float)Math.Abs(color.x - 1); - texcolor.G = (float)Math.Abs(color.y - 1); - texcolor.B = (float)Math.Abs(color.z - 1); - tex.DefaultTexture.RGBA = texcolor; for (uint i = 0; i < 32; i++) { if (tex.FaceTextures[i] != null) @@ -499,7 +494,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color { - return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); + return (double)((tex.FaceTextures[0].RGBA.A * 255) / 255); } if (face > -1) { @@ -522,9 +517,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler } else if (face == -1) { - texcolor = tex.DefaultTexture.RGBA; - texcolor.A = (float)Math.Abs(alpha - 1); - tex.DefaultTexture.RGBA = texcolor; for (int i = 0; i < 32; i++) { if (tex.FaceTextures[i] != null) @@ -548,7 +540,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler LSL_Types.Vector3 rgb; if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color { - texcolor = tex.DefaultTexture.RGBA; + texcolor = tex.FaceTextures[0].RGBA; rgb.x = (255 - (texcolor.R * 255)) / 255; rgb.y = (255 - (texcolor.G * 255)) / 255; rgb.z = (255 - (texcolor.B * 255)) / 255; @@ -586,7 +578,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler tex.FaceTextures[i].TextureID = new LLUUID(texture); } } - tex.DefaultTexture.TextureID = new LLUUID(texture); m_host.UpdateTexture(tex); return; } @@ -617,8 +608,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler } } - tex.DefaultTexture.RepeatU = (float)u; - tex.DefaultTexture.RepeatV = (float)v; m_host.UpdateTexture(tex); return; } @@ -648,8 +637,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler tex.FaceTextures[i].OffsetV = (float)v; } } - tex.DefaultTexture.OffsetU = (float)u; - tex.DefaultTexture.OffsetV = (float)v; m_host.UpdateTexture(tex); return; } @@ -677,7 +664,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler tex.FaceTextures[i].Rotation = (float)rotation; } } - tex.DefaultTexture.Rotation = (float)rotation; m_host.UpdateTexture(tex); return; } @@ -696,7 +682,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler { LLObject.TextureEntryFace texface; texface = tex.GetFace((uint)face); - return texface.TextureID.ToStringHyphenated(); + return texface.TextureID.ToString(); } NotImplemented("llGetTexture"); return ""; @@ -1035,7 +1021,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler public string llGetOwner() { - return m_host.ObjectOwner.ToStringHyphenated(); + return m_host.ObjectOwner.ToString(); } public void llInstantMessage(string user, string message) @@ -1063,7 +1049,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler public string llGetKey() { - return m_host.UUID.ToStringHyphenated(); + return m_host.UUID.ToString(); } public void llSetBuoyancy(double buoyancy) @@ -1277,7 +1263,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); if (part != null) { - return part.UUID.ToStringHyphenated(); + return part.UUID.ToString(); } else { @@ -1621,11 +1607,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler { return "00000000-0000-0000-0000-000000000000"; } - //return OpenSim.Framework.ToStringHyphenated(src[index]); + //return OpenSim.Framework.ToString(src[index]); LLUUID tmpkey; if (LLUUID.TryParse(src.Data[index].ToString(), out tmpkey)) { - return tmpkey.ToStringHyphenated(); + return tmpkey.ToString(); } else { @@ -2380,7 +2366,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler public string llGetCreator() { - return m_host.ObjectCreator.ToStringHyphenated(); + return m_host.ObjectCreator.ToString(); } public string llGetTimestamp() @@ -2807,14 +2793,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, extraParams, timer); - return createdTexture.ToStringHyphenated(); + return createdTexture.ToString(); } else { //TODO update existing dynamic textures } - return LLUUID.Zero.ToStringHyphenated(); + return LLUUID.Zero.ToString(); } private void NotImplemented(string Command) diff --git a/bin/libsecondlife.dll b/bin/libsecondlife.dll index ac75251..2f813b1 100644 Binary files a/bin/libsecondlife.dll and b/bin/libsecondlife.dll differ -- cgit v1.1