aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs21
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 7568870..1ab63f7 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -320,7 +320,8 @@ namespace OpenSim.Services.LLLoginService
320 Vector3 position = Vector3.Zero; 320 Vector3 position = Vector3.Zero;
321 Vector3 lookAt = Vector3.Zero; 321 Vector3 lookAt = Vector3.Zero;
322 GridRegion gatekeeper = null; 322 GridRegion gatekeeper = null;
323 GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt); 323 TeleportFlags flags;
324 GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt, out flags);
324 if (destination == null) 325 if (destination == null)
325 { 326 {
326 m_PresenceService.LogoutAgent(session); 327 m_PresenceService.LogoutAgent(session);
@@ -343,7 +344,7 @@ namespace OpenSim.Services.LLLoginService
343 string reason = string.Empty; 344 string reason = string.Empty;
344 GridRegion dest; 345 GridRegion dest;
345 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, 346 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where,
346 clientVersion, channel, mac, id0, clientIP, out where, out reason, out dest); 347 clientVersion, channel, mac, id0, clientIP, flags, out where, out reason, out dest);
347 destination = dest; 348 destination = dest;
348 if (aCircuit == null) 349 if (aCircuit == null)
349 { 350 {
@@ -378,8 +379,10 @@ namespace OpenSim.Services.LLLoginService
378 } 379 }
379 } 380 }
380 381
381 protected GridRegion FindDestination(UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, GridRegion home, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt) 382 protected GridRegion FindDestination(UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, GridRegion home, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt, out TeleportFlags flags)
382 { 383 {
384 flags = TeleportFlags.ViaLogin;
385
383 m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation); 386 m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation);
384 387
385 gatekeeper = null; 388 gatekeeper = null;
@@ -473,6 +476,8 @@ namespace OpenSim.Services.LLLoginService
473 } 476 }
474 else 477 else
475 { 478 {
479 flags |= TeleportFlags.ViaRegionID;
480
476 // free uri form 481 // free uri form
477 // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 482 // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34
478 where = "url"; 483 where = "url";
@@ -624,7 +629,7 @@ namespace OpenSim.Services.LLLoginService
624 629
625 protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar, 630 protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar,
626 UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0, 631 UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0,
627 IPEndPoint clientIP, out string where, out string reason, out GridRegion dest) 632 IPEndPoint clientIP, TeleportFlags flags, out string where, out string reason, out GridRegion dest)
628 { 633 {
629 where = currentWhere; 634 where = currentWhere;
630 ISimulationService simConnector = null; 635 ISimulationService simConnector = null;
@@ -663,7 +668,7 @@ namespace OpenSim.Services.LLLoginService
663 { 668 {
664 circuitCode = (uint)Util.RandomClass.Next(); ; 669 circuitCode = (uint)Util.RandomClass.Next(); ;
665 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0); 670 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
666 success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason); 671 success = LaunchAgentDirectly(simConnector, destination, aCircuit, flags, out reason);
667 if (!success && m_GridService != null) 672 if (!success && m_GridService != null)
668 { 673 {
669 // Try the fallback regions 674 // Try the fallback regions
@@ -672,7 +677,7 @@ namespace OpenSim.Services.LLLoginService
672 { 677 {
673 foreach (GridRegion r in fallbacks) 678 foreach (GridRegion r in fallbacks)
674 { 679 {
675 success = LaunchAgentDirectly(simConnector, r, aCircuit, out reason); 680 success = LaunchAgentDirectly(simConnector, r, aCircuit, flags | TeleportFlags.ViaRegionID, out reason);
676 if (success) 681 if (success)
677 { 682 {
678 where = "safe"; 683 where = "safe";
@@ -795,9 +800,9 @@ namespace OpenSim.Services.LLLoginService
795 800
796 } 801 }
797 802
798 private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, out string reason) 803 private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason)
799 { 804 {
800 return simConnector.CreateAgent(region, aCircuit, (int)Constants.TeleportFlags.ViaLogin, out reason); 805 return simConnector.CreateAgent(region, aCircuit, (uint)flags, out reason);
801 } 806 }
802 807
803 private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) 808 private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason)