aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs43
1 files changed, 22 insertions, 21 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 6a289d1..3ccdc9c 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -865,6 +865,9 @@ namespace OpenSim.Services.LLLoginService
865 reason = string.Empty; 865 reason = string.Empty;
866 uint circuitCode = 0; 866 uint circuitCode = 0;
867 AgentCircuitData aCircuit = null; 867 AgentCircuitData aCircuit = null;
868 dest = null;
869
870 bool success = false;
868 871
869 if (m_UserAgentService == null) 872 if (m_UserAgentService == null)
870 { 873 {
@@ -875,28 +878,14 @@ namespace OpenSim.Services.LLLoginService
875 simConnector = m_LocalSimulationService; 878 simConnector = m_LocalSimulationService;
876 else if (m_RemoteSimulationService != null) 879 else if (m_RemoteSimulationService != null)
877 simConnector = m_RemoteSimulationService; 880 simConnector = m_RemoteSimulationService;
878 }
879 else // User Agent Service is on
880 {
881 if (gatekeeper == null) // login to local grid
882 {
883 if (hostName == string.Empty)
884 SetHostAndPort(m_GatekeeperURL);
885 881
886 gatekeeper = new GridRegion(destination); 882 if(simConnector == null)
887 gatekeeper.ExternalHostName = hostName; 883 return null;
888 gatekeeper.HttpPort = (uint)port;
889 gatekeeper.ServerURI = m_GatekeeperURL;
890 }
891 m_log.Debug("[LLLOGIN SERVICE]: no gatekeeper detected..... using " + m_GatekeeperURL);
892 }
893
894 bool success = false;
895 884
896 if (m_UserAgentService == null && simConnector != null)
897 {
898 circuitCode = (uint)Util.RandomClass.Next(); ; 885 circuitCode = (uint)Util.RandomClass.Next(); ;
899 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0); 886 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position,
887 clientIP.Address.ToString(), viewer, channel, mac, id0);
888
900 success = LaunchAgentDirectly(simConnector, destination, aCircuit, flags, out reason); 889 success = LaunchAgentDirectly(simConnector, destination, aCircuit, flags, out reason);
901 if (!success && m_GridService != null) 890 if (!success && m_GridService != null)
902 { 891 {
@@ -918,10 +907,22 @@ namespace OpenSim.Services.LLLoginService
918 } 907 }
919 } 908 }
920 909
921 if (m_UserAgentService != null) 910 else
922 { 911 {
912 if (gatekeeper == null) // login to local grid
913 {
914 if (hostName == string.Empty)
915 SetHostAndPort(m_GatekeeperURL);
916
917 gatekeeper = new GridRegion(destination);
918 gatekeeper.ExternalHostName = hostName;
919 gatekeeper.HttpPort = (uint)port;
920 gatekeeper.ServerURI = m_GatekeeperURL;
921 }
923 circuitCode = (uint)Util.RandomClass.Next(); ; 922 circuitCode = (uint)Util.RandomClass.Next(); ;
924 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0); 923 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position,
924 clientIP.Address.ToString(), viewer, channel, mac, id0);
925
925 aCircuit.teleportFlags |= (uint)flags; 926 aCircuit.teleportFlags |= (uint)flags;
926 success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason); 927 success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason);
927 if (!success && m_GridService != null) 928 if (!success && m_GridService != null)