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 --- .../Framework/Communications/Cache/AssetServerBase.cs | 2 +- .../Framework/Communications/Cache/AssetTransactions.cs | 4 ++-- .../Framework/Communications/Cache/LibraryRootFolder.cs | 6 +++--- OpenSim/Framework/Communications/Capabilities/Caps.cs | 4 ++-- OpenSim/Framework/Communications/Capabilities/LLSD.cs | 4 ++-- OpenSim/Framework/Communications/LoginResponse.cs | 8 ++++---- OpenSim/Framework/Communications/LoginService.cs | 16 ++++++++-------- 7 files changed, 22 insertions(+), 22 deletions(-) (limited to 'OpenSim/Framework/Communications') 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 +} -- cgit v1.1