aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService/LLLoginService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 9e24a39..7471c77 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -329,7 +329,7 @@ namespace OpenSim.Services.LLLoginService
329 // Instantiate/get the simulation interface and launch an agent at the destination 329 // Instantiate/get the simulation interface and launch an agent at the destination
330 // 330 //
331 string reason = string.Empty; 331 string reason = string.Empty;
332 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, clientVersion, out where, out reason); 332 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, clientVersion, clientIP, out where, out reason);
333 333
334 if (aCircuit == null) 334 if (aCircuit == null)
335 { 335 {
@@ -589,7 +589,7 @@ namespace OpenSim.Services.LLLoginService
589 } 589 }
590 590
591 protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarData avatar, 591 protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarData avatar,
592 UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, out string where, out string reason) 592 UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, IPEndPoint clientIP, out string where, out string reason)
593 { 593 {
594 where = currentWhere; 594 where = currentWhere;
595 ISimulationService simConnector = null; 595 ISimulationService simConnector = null;
@@ -655,7 +655,7 @@ namespace OpenSim.Services.LLLoginService
655 { 655 {
656 circuitCode = (uint)Util.RandomClass.Next(); ; 656 circuitCode = (uint)Util.RandomClass.Next(); ;
657 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, viewer); 657 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, viewer);
658 success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, out reason); 658 success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason);
659 if (!success && m_GridService != null) 659 if (!success && m_GridService != null)
660 { 660 {
661 // Try the fallback regions 661 // Try the fallback regions
@@ -664,7 +664,7 @@ namespace OpenSim.Services.LLLoginService
664 { 664 {
665 foreach (GridRegion r in fallbacks) 665 foreach (GridRegion r in fallbacks)
666 { 666 {
667 success = LaunchAgentIndirectly(gatekeeper, r, aCircuit, out reason); 667 success = LaunchAgentIndirectly(gatekeeper, r, aCircuit, clientIP, out reason);
668 if (success) 668 if (success)
669 { 669 {
670 where = "safe"; 670 where = "safe";
@@ -741,10 +741,15 @@ namespace OpenSim.Services.LLLoginService
741 return simConnector.CreateAgent(region, aCircuit, (int)Constants.TeleportFlags.ViaLogin, out reason); 741 return simConnector.CreateAgent(region, aCircuit, (int)Constants.TeleportFlags.ViaLogin, out reason);
742 } 742 }
743 743
744 private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, out string reason) 744 private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason)
745 { 745 {
746 m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName); 746 m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName);
747 return m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason); 747 if (m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason))
748 {
749 m_UserAgentService.SetClientToken(aCircuit.SessionID, clientIP.Address.ToString());
750 return true;
751 }
752 return false;
748 } 753 }
749 754
750 #region Console Commands 755 #region Console Commands