From e4d26d7bfa4b4d4e775531a7dd400f41fc61f45f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 19 Jun 2009 20:46:17 +0000 Subject: When a shared module hooks OnClientClosed, it has no way of finding out which client connection has closed. So, in multi-region sims, things can get messy fast. This introduces a second parameters, which is a Scene object ref. Minor adjustments to custom modules may be required due to this change. --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 2 +- OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs | 2 +- .../CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 2 +- OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs | 2 +- OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 8afb8fe..b98bfaf 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -382,7 +382,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends client.OnLogout += OnLogout; } - private void ClientClosed(UUID AgentId) + private void ClientClosed(UUID AgentId, Scene scene) { // agent's client was closed. As we handle logout in OnLogout, this here has only to handle // TPing away (root agent is closed) or TPing/crossing in a region far enough away (client diff --git a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs index a733585..31363e5 100644 --- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs @@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups remote_client.SendGroupNameReply(groupUUID, groupnamereply); } - private void OnClientClosed(UUID agentID) + private void OnClientClosed(UUID agentID, Scene scene) { lock (m_ClientMap) { diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 12f5d19..d862c06 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -368,7 +368,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer return false; } - public void ClientLoggedOut(UUID agentID) + public void ClientLoggedOut(UUID agentID, Scene scene) { if (m_AgentRegions.ContainsKey(agentID)) m_AgentRegions.Remove(agentID); diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs index a94f23f..3dcf342 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs @@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue // ClientClosed(client.AgentId); // } - private void ClientClosed(UUID AgentID) + private void ClientClosed(UUID AgentID, Scene scene) { m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName); diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 6fe0b57..16c02a3 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -287,7 +287,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap /// Event handler /// /// AgentID that logged out - private void ClientLoggedOut(UUID AgentId) + private void ClientLoggedOut(UUID AgentId, Scene scene) { List presences = m_scene.GetAvatars(); int rootcount = 0; -- cgit v1.1