aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService/UserAgentService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs')
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index eb6433c..eb19fe2 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -134,23 +134,28 @@ namespace OpenSim.Services.HypergridService
134 public bool LoginAgentToGrid(AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, IPEndPoint clientIP, out string reason) 134 public bool LoginAgentToGrid(AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, IPEndPoint clientIP, out string reason)
135 { 135 {
136 m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", 136 m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}",
137 agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()), 137 agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()), gatekeeper.ServerURI);
138 gatekeeper.ExternalHostName +":"+ gatekeeper.HttpPort);
139 138
139 m_log.Debug("LATG final server uri -> " + finalDestination.ServerURI );
140 // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination 140 // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination
141 GridRegion region = new GridRegion(gatekeeper); 141 GridRegion region = new GridRegion(gatekeeper);
142 region.ServerURI = gatekeeper.ServerURI;
143 region.ExternalHostName = finalDestination.ExternalHostName;
144 region.InternalEndPoint = finalDestination.InternalEndPoint;
142 region.RegionName = finalDestination.RegionName; 145 region.RegionName = finalDestination.RegionName;
143 region.RegionID = finalDestination.RegionID; 146 region.RegionID = finalDestination.RegionID;
144 region.RegionLocX = finalDestination.RegionLocX; 147 region.RegionLocX = finalDestination.RegionLocX;
145 region.RegionLocY = finalDestination.RegionLocY; 148 region.RegionLocY = finalDestination.RegionLocY;
146 149
147 // Generate a new service session 150 // Generate a new service session
148 agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random(); 151 agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random();
149 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); 152 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
150 153
154 m_log.Debug("region ServerURI -> " + region.ServerURI);
155
151 bool success = false; 156 bool success = false;
152 string myExternalIP = string.Empty; 157 string myExternalIP = string.Empty;
153 string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort; 158 string gridName = gatekeeper.ServerURI;
154 if (m_GridName == gridName) 159 if (m_GridName == gridName)
155 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); 160 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
156 else 161 else
@@ -159,7 +164,7 @@ namespace OpenSim.Services.HypergridService
159 if (!success) 164 if (!success)
160 { 165 {
161 m_log.DebugFormat("[USER AGENT SERVICE]: Unable to login user {0} {1} to grid {2}, reason: {3}", 166 m_log.DebugFormat("[USER AGENT SERVICE]: Unable to login user {0} {1} to grid {2}, reason: {3}",
162 agentCircuit.firstname, agentCircuit.lastname, region.ExternalHostName + ":" + region.HttpPort, reason); 167 agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason);
163 168
164 // restore the old travel info 169 // restore the old travel info
165 lock (m_TravelingAgents) 170 lock (m_TravelingAgents)
@@ -210,7 +215,7 @@ namespace OpenSim.Services.HypergridService
210 m_TravelingAgents[agentCircuit.SessionID] = travel; 215 m_TravelingAgents[agentCircuit.SessionID] = travel;
211 } 216 }
212 travel.UserID = agentCircuit.AgentID; 217 travel.UserID = agentCircuit.AgentID;
213 travel.GridExternalName = "http://" + region.ExternalHostName + ":" + region.HttpPort; 218 travel.GridExternalName = region.ServerURI;
214 travel.ServiceToken = agentCircuit.ServiceSessionID; 219 travel.ServiceToken = agentCircuit.ServiceSessionID;
215 if (old != null) 220 if (old != null)
216 travel.ClientIPAddress = old.ClientIPAddress; 221 travel.ClientIPAddress = old.ClientIPAddress;