aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/HypergridService')
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs2
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs20
2 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 0aa5352..10e3aee 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -157,7 +157,7 @@ namespace OpenSim.Services.HypergridService
157 string regionimage = "regionImage" + region.RegionID.ToString(); 157 string regionimage = "regionImage" + region.RegionID.ToString();
158 regionimage = regionimage.Replace("-", ""); 158 regionimage = regionimage.Replace("-", "");
159 159
160 imageURL = "http://" + region.ExternalHostName + ":" + region.HttpPort + "/index.php?method=" + regionimage; 160 imageURL = region.ServerURI + "index.php?method=" + regionimage;
161 161
162 return true; 162 return true;
163 } 163 }
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index eb6433c..32b4249 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -134,23 +134,27 @@ 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
140 // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination 138 // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination
141 GridRegion region = new GridRegion(gatekeeper); 139 GridRegion region = new GridRegion(gatekeeper);
140 region.ServerURI = gatekeeper.ServerURI;
141 region.ExternalHostName = finalDestination.ExternalHostName;
142 region.InternalEndPoint = finalDestination.InternalEndPoint;
142 region.RegionName = finalDestination.RegionName; 143 region.RegionName = finalDestination.RegionName;
143 region.RegionID = finalDestination.RegionID; 144 region.RegionID = finalDestination.RegionID;
144 region.RegionLocX = finalDestination.RegionLocX; 145 region.RegionLocX = finalDestination.RegionLocX;
145 region.RegionLocY = finalDestination.RegionLocY; 146 region.RegionLocY = finalDestination.RegionLocY;
146 147
147 // Generate a new service session 148 // Generate a new service session
148 agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random(); 149 agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random();
149 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); 150 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
150 151
151 bool success = false; 152 bool success = false;
152 string myExternalIP = string.Empty; 153 string myExternalIP = string.Empty;
153 string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort; 154 string gridName = gatekeeper.ServerURI;
155
156 m_log.Debug("m_grid - " + m_GridName + ", gn - " + gridName);
157
154 if (m_GridName == gridName) 158 if (m_GridName == gridName)
155 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); 159 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
156 else 160 else
@@ -159,7 +163,7 @@ namespace OpenSim.Services.HypergridService
159 if (!success) 163 if (!success)
160 { 164 {
161 m_log.DebugFormat("[USER AGENT SERVICE]: Unable to login user {0} {1} to grid {2}, reason: {3}", 165 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); 166 agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason);
163 167
164 // restore the old travel info 168 // restore the old travel info
165 lock (m_TravelingAgents) 169 lock (m_TravelingAgents)
@@ -210,7 +214,7 @@ namespace OpenSim.Services.HypergridService
210 m_TravelingAgents[agentCircuit.SessionID] = travel; 214 m_TravelingAgents[agentCircuit.SessionID] = travel;
211 } 215 }
212 travel.UserID = agentCircuit.AgentID; 216 travel.UserID = agentCircuit.AgentID;
213 travel.GridExternalName = "http://" + region.ExternalHostName + ":" + region.HttpPort; 217 travel.GridExternalName = region.ServerURI;
214 travel.ServiceToken = agentCircuit.ServiceSessionID; 218 travel.ServiceToken = agentCircuit.ServiceSessionID;
215 if (old != null) 219 if (old != null)
216 travel.ClientIPAddress = old.ClientIPAddress; 220 travel.ClientIPAddress = old.ClientIPAddress;