diff options
Addresses mantis #4929. Agent was being logged off the grid too soon -- things may still fail.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 7d26e3f..d49d18d 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -140,9 +140,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
140 | return false; | 140 | return false; |
141 | } | 141 | } |
142 | 142 | ||
143 | protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason) | 143 | protected override void AgentHasMovedAway(UUID sessionID, bool logout) |
144 | { | ||
145 | if (logout) | ||
146 | // Log them out of this grid | ||
147 | m_aScene.PresenceService.LogoutAgent(sessionID); | ||
148 | } | ||
149 | |||
150 | protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) | ||
144 | { | 151 | { |
145 | reason = string.Empty; | 152 | reason = string.Empty; |
153 | logout = false; | ||
146 | int flags = m_aScene.GridService.GetRegionFlags(m_aScene.RegionInfo.ScopeID, reg.RegionID); | 154 | int flags = m_aScene.GridService.GetRegionFlags(m_aScene.RegionInfo.ScopeID, reg.RegionID); |
147 | if (flags == -1 /* no region in DB */ || (flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) | 155 | if (flags == -1 /* no region in DB */ || (flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) |
148 | { | 156 | { |
@@ -152,9 +160,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
152 | string userAgentDriver = agentCircuit.ServiceURLs["HomeURI"].ToString(); | 160 | string userAgentDriver = agentCircuit.ServiceURLs["HomeURI"].ToString(); |
153 | IUserAgentService connector = new UserAgentServiceConnector(userAgentDriver); | 161 | IUserAgentService connector = new UserAgentServiceConnector(userAgentDriver); |
154 | bool success = connector.LoginAgentToGrid(agentCircuit, reg, finalDestination, out reason); | 162 | bool success = connector.LoginAgentToGrid(agentCircuit, reg, finalDestination, out reason); |
155 | if (success) | 163 | logout = success; |
156 | // Log them out of this grid | ||
157 | m_aScene.PresenceService.LogoutAgent(agentCircuit.SessionID); | ||
158 | 164 | ||
159 | return success; | 165 | return success; |
160 | } | 166 | } |