Fix bug with "kick user" reducing agent counts by 2 instead of 1.
This is done by making the kick user command call IClientAPI.Close() rather than routing through Scene.IncomingCloseAgent(), which also called IClientAPI.Close() DisableSimulator for child agents is moved from IncomingCloseAgent() to RemoveClient(), this is not a functional change since IncomingCloseAgent() always ends up calling RemoveClient()0.7.3-extended
parent
d30d68657e
commit
78c2ef2346
|
@ -486,10 +486,10 @@ namespace OpenSim
|
||||||
else
|
else
|
||||||
presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n");
|
presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n");
|
||||||
|
|
||||||
// ...and close on our side
|
presence.ControllingClient.Close();
|
||||||
presence.Scene.IncomingCloseAgent(presence.UUID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.Output("");
|
MainConsole.Instance.Output("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -920,7 +920,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.InfoFormat(
|
m_log.InfoFormat(
|
||||||
"[INTERGRID]: Got notice about far away Region: {0} at ({1}, {2})",
|
"[SCENE]: Got notice about far away Region: {0} at ({1}, {2})",
|
||||||
otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY);
|
otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3215,6 +3215,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
isChildAgent = avatar.IsChildAgent;
|
isChildAgent = avatar.IsChildAgent;
|
||||||
|
|
||||||
|
// Don't do this to root agents, it's not nice for the viewer
|
||||||
|
if (closeChildAgents && isChildAgent)
|
||||||
|
{
|
||||||
|
// Tell a single agent to disconnect from the region.
|
||||||
|
IEventQueue eq = RequestModuleInterface<IEventQueue>();
|
||||||
|
if (eq != null)
|
||||||
|
{
|
||||||
|
eq.DisableSimulator(RegionInfo.RegionHandle, avatar.UUID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
avatar.ControllingClient.SendShutdownConnectionNotice();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only applies to root agents.
|
||||||
if (avatar.ParentID != 0)
|
if (avatar.ParentID != 0)
|
||||||
{
|
{
|
||||||
avatar.StandUp();
|
avatar.StandUp();
|
||||||
|
@ -3995,19 +4011,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_sceneGraph.removeUserCount(true);
|
m_sceneGraph.removeUserCount(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't do this to root agents on logout, it's not nice for the viewer
|
|
||||||
if (presence.IsChildAgent)
|
|
||||||
{
|
|
||||||
// Tell a single agent to disconnect from the region.
|
|
||||||
IEventQueue eq = RequestModuleInterface<IEventQueue>();
|
|
||||||
if (eq != null)
|
|
||||||
{
|
|
||||||
eq.DisableSimulator(RegionInfo.RegionHandle, agentID);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
presence.ControllingClient.SendShutdownConnectionNotice();
|
|
||||||
}
|
|
||||||
|
|
||||||
presence.ControllingClient.Close();
|
presence.ControllingClient.Close();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,16 +84,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (neighbourService != null)
|
if (neighbourService != null)
|
||||||
neighbour = neighbourService.HelloNeighbour(regionhandle, region);
|
neighbour = neighbourService.HelloNeighbour(regionhandle, region);
|
||||||
else
|
else
|
||||||
m_log.DebugFormat("[SCS]: No neighbour service provided for informing neigbhours of this region");
|
m_log.DebugFormat("[SCENE COMMUNICATION SERVICE]: No neighbour service provided for informing neigbhours of this region");
|
||||||
|
|
||||||
if (neighbour != null)
|
if (neighbour != null)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[INTERGRID]: Successfully informed neighbour {0}-{1} that I'm here", x / Constants.RegionSize, y / Constants.RegionSize);
|
m_log.DebugFormat("[SCENE COMMUNICATION SERVICE]: Successfully informed neighbour {0}-{1} that I'm here", x / Constants.RegionSize, y / Constants.RegionSize);
|
||||||
m_scene.EventManager.TriggerOnRegionUp(neighbour);
|
m_scene.EventManager.TriggerOnRegionUp(neighbour);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[INTERGRID]: Failed to inform neighbour {0}-{1} that I'm here.", x / Constants.RegionSize, y / Constants.RegionSize);
|
m_log.InfoFormat("[SCENE COMMUNICATION SERVICE]: Failed to inform neighbour {0}-{1} that I'm here.", x / Constants.RegionSize, y / Constants.RegionSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
|
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
|
||||||
|
|
||||||
List<GridRegion> neighbours = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID);
|
List<GridRegion> neighbours = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID);
|
||||||
m_log.DebugFormat("[INTERGRID]: Informing {0} neighbours that this region is up", neighbours.Count);
|
m_log.DebugFormat("[SCENE COMMUNICATION SERVICE]: Informing {0} neighbours that this region is up", neighbours.Count);
|
||||||
foreach (GridRegion n in neighbours)
|
foreach (GridRegion n in neighbours)
|
||||||
{
|
{
|
||||||
InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync;
|
InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync;
|
||||||
|
@ -195,8 +195,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y);
|
GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y);
|
||||||
|
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[INTERGRID]: Sending close agent {0} to region at {1}-{2}",
|
"[SCENE COMMUNICATION SERVICE]: Sending close agent ID {0} to {1}", agentID, destination.RegionName);
|
||||||
agentID, destination.RegionCoordX, destination.RegionCoordY);
|
|
||||||
|
|
||||||
m_scene.SimulationService.CloseAgent(destination, agentID);
|
m_scene.SimulationService.CloseAgent(destination, agentID);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue