diff options
author | UbitUmarov | 2017-05-11 20:24:47 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-11 20:24:47 +0100 |
commit | f09fafff349af9e020871f622130508e882a1b35 (patch) | |
tree | 8078f2c47e923f813723e24e0be9b6b1e4060989 /OpenSim/Services | |
parent | avoid a null ref (diff) | |
download | opensim-SC_OLD-f09fafff349af9e020871f622130508e882a1b35.zip opensim-SC_OLD-f09fafff349af9e020871f622130508e882a1b35.tar.gz opensim-SC_OLD-f09fafff349af9e020871f622130508e882a1b35.tar.bz2 opensim-SC_OLD-f09fafff349af9e020871f622130508e882a1b35.tar.xz |
some cleanup
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 43 |
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) |