diff options
author | Melanie | 2011-01-27 03:49:32 +0100 |
---|---|---|
committer | Melanie | 2011-01-27 03:49:32 +0100 |
commit | 3b8b606eeb98c57295ef69a62bb7f069094fffe7 (patch) | |
tree | fe85a4f388176778d378ef283f9a3b1bbe1ce4e8 | |
parent | Clear user account cache before checking flags on login. This will make AV (diff) | |
download | opensim-SC_OLD-3b8b606eeb98c57295ef69a62bb7f069094fffe7.zip opensim-SC_OLD-3b8b606eeb98c57295ef69a62bb7f069094fffe7.tar.gz opensim-SC_OLD-3b8b606eeb98c57295ef69a62bb7f069094fffe7.tar.bz2 opensim-SC_OLD-3b8b606eeb98c57295ef69a62bb7f069094fffe7.tar.xz |
Add TeleportFlags.ViaRegionID to the flags sent on login when the region
was entered by hand to determine whether or not to honor the landing
point
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 6c4dc4d..07a5dc1 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -327,7 +327,8 @@ namespace OpenSim.Services.LLLoginService | |||
327 | Vector3 position = Vector3.Zero; | 327 | Vector3 position = Vector3.Zero; |
328 | Vector3 lookAt = Vector3.Zero; | 328 | Vector3 lookAt = Vector3.Zero; |
329 | GridRegion gatekeeper = null; | 329 | GridRegion gatekeeper = null; |
330 | GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt); | 330 | TeleportFlags flags; |
331 | GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt, out flags); | ||
331 | if (destination == null) | 332 | if (destination == null) |
332 | { | 333 | { |
333 | m_PresenceService.LogoutAgent(session); | 334 | m_PresenceService.LogoutAgent(session); |
@@ -350,7 +351,7 @@ namespace OpenSim.Services.LLLoginService | |||
350 | string reason = string.Empty; | 351 | string reason = string.Empty; |
351 | GridRegion dest; | 352 | GridRegion dest; |
352 | AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, | 353 | AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, |
353 | clientVersion, channel, mac, id0, clientIP, out where, out reason, out dest); | 354 | clientVersion, channel, mac, id0, clientIP, flags, out where, out reason, out dest); |
354 | destination = dest; | 355 | destination = dest; |
355 | if (aCircuit == null) | 356 | if (aCircuit == null) |
356 | { | 357 | { |
@@ -385,8 +386,10 @@ namespace OpenSim.Services.LLLoginService | |||
385 | } | 386 | } |
386 | } | 387 | } |
387 | 388 | ||
388 | 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) | 389 | 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) |
389 | { | 390 | { |
391 | flags = TeleportFlags.ViaLogin; | ||
392 | |||
390 | m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation); | 393 | m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation); |
391 | 394 | ||
392 | gatekeeper = null; | 395 | gatekeeper = null; |
@@ -480,6 +483,8 @@ namespace OpenSim.Services.LLLoginService | |||
480 | } | 483 | } |
481 | else | 484 | else |
482 | { | 485 | { |
486 | flags |= TeleportFlags.ViaRegionID; | ||
487 | |||
483 | // free uri form | 488 | // free uri form |
484 | // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 | 489 | // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 |
485 | where = "url"; | 490 | where = "url"; |
@@ -631,7 +636,7 @@ namespace OpenSim.Services.LLLoginService | |||
631 | 636 | ||
632 | protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar, | 637 | protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar, |
633 | UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0, | 638 | UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0, |
634 | IPEndPoint clientIP, out string where, out string reason, out GridRegion dest) | 639 | IPEndPoint clientIP, TeleportFlags flags, out string where, out string reason, out GridRegion dest) |
635 | { | 640 | { |
636 | where = currentWhere; | 641 | where = currentWhere; |
637 | ISimulationService simConnector = null; | 642 | ISimulationService simConnector = null; |
@@ -670,7 +675,7 @@ namespace OpenSim.Services.LLLoginService | |||
670 | { | 675 | { |
671 | circuitCode = (uint)Util.RandomClass.Next(); ; | 676 | circuitCode = (uint)Util.RandomClass.Next(); ; |
672 | aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0); | 677 | aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0); |
673 | success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason); | 678 | success = LaunchAgentDirectly(simConnector, destination, aCircuit, flags, out reason); |
674 | if (!success && m_GridService != null) | 679 | if (!success && m_GridService != null) |
675 | { | 680 | { |
676 | // Try the fallback regions | 681 | // Try the fallback regions |
@@ -679,7 +684,7 @@ namespace OpenSim.Services.LLLoginService | |||
679 | { | 684 | { |
680 | foreach (GridRegion r in fallbacks) | 685 | foreach (GridRegion r in fallbacks) |
681 | { | 686 | { |
682 | success = LaunchAgentDirectly(simConnector, r, aCircuit, out reason); | 687 | success = LaunchAgentDirectly(simConnector, r, aCircuit, flags | TeleportFlags.ViaRegionID, out reason); |
683 | if (success) | 688 | if (success) |
684 | { | 689 | { |
685 | where = "safe"; | 690 | where = "safe"; |
@@ -802,9 +807,9 @@ namespace OpenSim.Services.LLLoginService | |||
802 | 807 | ||
803 | } | 808 | } |
804 | 809 | ||
805 | private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, out string reason) | 810 | private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) |
806 | { | 811 | { |
807 | return simConnector.CreateAgent(region, aCircuit, (int)Constants.TeleportFlags.ViaLogin, out reason); | 812 | return simConnector.CreateAgent(region, aCircuit, (uint)flags, out reason); |
808 | } | 813 | } |
809 | 814 | ||
810 | private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) | 815 | private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) |