From d4600eec4d4555eec8c2815503a2aa7a75d6d928 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 21 Aug 2009 13:35:13 +1000 Subject: * Attempting to diagnose a connection bug. --- OpenSim/Region/Framework/Scenes/Scene.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d1f7a4b..b50d0cb 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2044,9 +2044,11 @@ namespace OpenSim.Region.Framework.Scenes { AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode); - m_log.DebugFormat( - "[SCENE]: Adding new {0} agent for {1} in {2}", - ((aCircuit.child == true) ? "child" : "root"), client.Name, RegionInfo.RegionName); + string logMsg = string.Format("[SCENE]: Adding new {0} agent for {1} in {2}", + ((aCircuit.child == true) ? "child" : "root"), client.Name, + RegionInfo.RegionName); + + m_log.Debug(logMsg); CommsManager.UserProfileCacheService.AddNewUser(client.AgentId); -- cgit v1.1 From 25dbf16cfb1d4c74792eae170bc766d3eb522a24 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 21 Aug 2009 13:44:20 +1000 Subject: * Once more into the breach! --- OpenSim/Region/Framework/Scenes/Scene.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b50d0cb..6118a70 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2044,11 +2044,14 @@ namespace OpenSim.Region.Framework.Scenes { AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode); + m_log.Debug("[Scene] Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName); + /* string logMsg = string.Format("[SCENE]: Adding new {0} agent for {1} in {2}", ((aCircuit.child == true) ? "child" : "root"), client.Name, RegionInfo.RegionName); m_log.Debug(logMsg); + */ CommsManager.UserProfileCacheService.AddNewUser(client.AgentId); @@ -2057,7 +2060,7 @@ namespace OpenSim.Region.Framework.Scenes // HERE!!! Do the initial attachments right here // first agent upon login is a root agent by design. // All other AddNewClient calls find aCircuit.child to be true - if (aCircuit.child == false) + if (aCircuit == null || aCircuit.child == false) { sp.IsChildAgent = false; sp.RezAttachments(); -- cgit v1.1 From e4f64dd7147001e1e0ac9bd4a51efec086727b29 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 20 Aug 2009 22:36:47 -0700 Subject: Made HandleFetchInventoryDescendents async, so that the client thread doesn't wait for the download of the entire inventory. --- .../Region/Framework/Scenes/Scene.PacketHandlers.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index d722e23..2b815a2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -441,9 +441,24 @@ namespace OpenSim.Region.Framework.Scenes return; } + // We're going to send the reply async, because there may be + // an enormous quantity of packets -- basically the entire inventory! + // We don't want to block the client thread while all that is happening. + SendInventoryDelegate d = SendInventoryAsync; + d.BeginInvoke(remoteClient, folderID, ownerID, fetchFolders, fetchItems, sortOrder, SendInventoryComplete, d); + } + + delegate void SendInventoryDelegate(IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder); + + void SendInventoryAsync(IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder) + { SendInventoryUpdate(remoteClient, new InventoryFolderBase(folderID), fetchFolders, fetchItems); - } - + } + + void SendInventoryComplete(IAsyncResult iar) + { + } + /// /// Handle the caps inventory descendents fetch. /// -- cgit v1.1 From b03eeeb9f6331ed36c61f55aef847ce3b2db7ba4 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 22 Aug 2009 10:24:26 -0700 Subject: * Fixes mantis http://opensimulator.org/mantis/view.php?id=4044. Turns out folders were never being removed from trash when they were singled out for purging in trash. They were being removed when Trash was purged as a whole. That behavior is now fixed for the new InventoryService set. * Removed left-overs from AssetInventoryServer. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 18 +++++------------- .../Region/Framework/Scenes/Scene.PacketHandlers.cs | 2 +- 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index a9d361b..3301536 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -789,23 +789,15 @@ namespace OpenSim.Region.Framework.Scenes } /// - /// Removes an inventory folder. Although there is a packet in the Linden protocol for this, it may be - /// legacy and not currently used (purge folder is used to remove folders from trash instead). + /// Removes an inventory folder. This packet is sent when the user + /// right-clicks a folder that's already in trash and chooses "purge" /// /// /// - private void RemoveInventoryFolder(IClientAPI remoteClient, UUID folderID) + private void RemoveInventoryFolder(IClientAPI remoteClient, List folderIDs) { - // Unclear is this handler is ever called by the Linden client, but it might - - InventoryFolderBase folder = new InventoryFolderBase(folderID); - folder.Owner = remoteClient.AgentId; - InventoryFolderBase trash = InventoryService.GetFolderForType(remoteClient.AgentId, AssetType.TrashFolder); - if (trash != null) - { - folder.ParentID = trash.ID; - InventoryService.MoveFolder(folder); - } + m_log.DebugFormat("[SCENE INVENTORY]: RemoveInventoryFolders count {0}", folderIDs.Count); + InventoryService.DeleteFolders(remoteClient.AgentId, folderIDs); } private SceneObjectGroup GetGroupByPrim(uint localID) diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 2b815a2..d3e414f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -552,7 +552,7 @@ namespace OpenSim.Region.Framework.Scenes public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) { - InventoryFolderBase folder = new InventoryFolderBase(folderID); + InventoryFolderBase folder = new InventoryFolderBase(folderID, remoteClient.AgentId); folder = InventoryService.GetFolder(folder); if (folder != null) { -- cgit v1.1