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.0.6.5-post-fixes
parent
f8666f3630
commit
2f581c0d0d
|
@ -381,7 +381,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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
/// Event handler
|
||||
/// </summary>
|
||||
/// <param name="AgentId">AgentID that logged out</param>
|
||||
private void ClientLoggedOut(UUID AgentId)
|
||||
private void ClientLoggedOut(UUID AgentId, Scene scene)
|
||||
{
|
||||
List<ScenePresence> presences = m_scene.GetAvatars();
|
||||
int rootcount = 0;
|
||||
|
|
|
@ -162,7 +162,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public event IncomingInstantMessage OnUnhandledInstantMessage;
|
||||
|
||||
public delegate void ClientClosed(UUID clientID);
|
||||
public delegate void ClientClosed(UUID clientID, Scene scene);
|
||||
|
||||
public event ClientClosed OnClientClosed;
|
||||
|
||||
|
@ -733,12 +733,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void TriggerClientClosed(UUID ClientID)
|
||||
public void TriggerClientClosed(UUID ClientID, Scene scene)
|
||||
{
|
||||
handlerClientClosed = OnClientClosed;
|
||||
if (handlerClientClosed != null)
|
||||
{
|
||||
handlerClientClosed(ClientID);
|
||||
handlerClientClosed(ClientID, scene);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2224,7 +2224,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
|
||||
|
||||
}
|
||||
m_eventManager.TriggerClientClosed(agentID);
|
||||
m_eventManager.TriggerClientClosed(agentID, this);
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
|
|
|
@ -697,7 +697,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
|||
/// When the client closes the connection we remove their accounting info from memory to free up resources.
|
||||
/// </summary>
|
||||
/// <param name="AgentID"></param>
|
||||
public void ClientClosed(UUID AgentID)
|
||||
public void ClientClosed(UUID AgentID, Scene scene)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -759,7 +759,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
|||
/// Event Handler for when the client logs out.
|
||||
/// </summary>
|
||||
/// <param name="AgentId"></param>
|
||||
private void ClientLoggedOut(UUID AgentId)
|
||||
private void ClientLoggedOut(UUID AgentId, Scene scene)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -770,7 +770,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
|||
/// <param name="client"></param>
|
||||
public void ClientClosed(IClientAPI client)
|
||||
{
|
||||
ClientClosed(client.AgentId);
|
||||
ClientClosed(client.AgentId, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -386,7 +386,7 @@ namespace OpenSim.Region.UserStatistics
|
|||
}
|
||||
|
||||
|
||||
public void OnClientClosed(UUID agentID)
|
||||
public void OnClientClosed(UUID agentID, Scene scene)
|
||||
{
|
||||
lock (m_sessions)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue