aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-10-22 23:52:07 +0100
committerJustin Clark-Casey (justincc)2010-10-22 23:52:07 +0100
commitfe8d3d5a2bc0ddbc051d8a7ad2412da5f3546075 (patch)
treee1af6e01bd9be556fe652a32e4ec93c31c80a283 /OpenSim/Services/HypergridService
parentMerge remote branch 'otakup0pe/mantis5110' (diff)
downloadopensim-SC_OLD-fe8d3d5a2bc0ddbc051d8a7ad2412da5f3546075.zip
opensim-SC_OLD-fe8d3d5a2bc0ddbc051d8a7ad2412da5f3546075.tar.gz
opensim-SC_OLD-fe8d3d5a2bc0ddbc051d8a7ad2412da5f3546075.tar.bz2
opensim-SC_OLD-fe8d3d5a2bc0ddbc051d8a7ad2412da5f3546075.tar.xz
Revert "Merge remote branch 'otakup0pe/mantis5110'"
This reverts commit 21187f459ea2ae590dda4249fa15ebf116d04fe0, reversing changes made to 8f34e46d7449be1c29419a232a8f7f1e5918f03c.
Diffstat (limited to 'OpenSim/Services/HypergridService')
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs2
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs17
2 files changed, 7 insertions, 12 deletions
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 9e96163..3f5c4f1 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 = region.ServerURI + "index.php?method=" + regionimage; 160 imageURL = "http://" + region.ExternalHostName + ":" + region.HttpPort + "/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 eb19fe2..eb6433c 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -134,28 +134,23 @@ 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()), gatekeeper.ServerURI); 137 agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()),
138 gatekeeper.ExternalHostName +":"+ gatekeeper.HttpPort);
138 139
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;
145 region.RegionName = finalDestination.RegionName; 142 region.RegionName = finalDestination.RegionName;
146 region.RegionID = finalDestination.RegionID; 143 region.RegionID = finalDestination.RegionID;
147 region.RegionLocX = finalDestination.RegionLocX; 144 region.RegionLocX = finalDestination.RegionLocX;
148 region.RegionLocY = finalDestination.RegionLocY; 145 region.RegionLocY = finalDestination.RegionLocY;
149 146
150 // Generate a new service session 147 // Generate a new service session
151 agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random(); 148 agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random();
152 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); 149 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
153 150
154 m_log.Debug("region ServerURI -> " + region.ServerURI);
155
156 bool success = false; 151 bool success = false;
157 string myExternalIP = string.Empty; 152 string myExternalIP = string.Empty;
158 string gridName = gatekeeper.ServerURI; 153 string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort;
159 if (m_GridName == gridName) 154 if (m_GridName == gridName)
160 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); 155 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
161 else 156 else
@@ -164,7 +159,7 @@ namespace OpenSim.Services.HypergridService
164 if (!success) 159 if (!success)
165 { 160 {
166 m_log.DebugFormat("[USER AGENT SERVICE]: Unable to login user {0} {1} to grid {2}, reason: {3}", 161 m_log.DebugFormat("[USER AGENT SERVICE]: Unable to login user {0} {1} to grid {2}, reason: {3}",
167 agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason); 162 agentCircuit.firstname, agentCircuit.lastname, region.ExternalHostName + ":" + region.HttpPort, reason);
168 163
169 // restore the old travel info 164 // restore the old travel info
170 lock (m_TravelingAgents) 165 lock (m_TravelingAgents)
@@ -215,7 +210,7 @@ namespace OpenSim.Services.HypergridService
215 m_TravelingAgents[agentCircuit.SessionID] = travel; 210 m_TravelingAgents[agentCircuit.SessionID] = travel;
216 } 211 }
217 travel.UserID = agentCircuit.AgentID; 212 travel.UserID = agentCircuit.AgentID;
218 travel.GridExternalName = region.ServerURI; 213 travel.GridExternalName = "http://" + region.ExternalHostName + ":" + region.HttpPort;
219 travel.ServiceToken = agentCircuit.ServiceSessionID; 214 travel.ServiceToken = agentCircuit.ServiceSessionID;
220 if (old != null) 215 if (old != null)
221 travel.ClientIPAddress = old.ClientIPAddress; 216 travel.ClientIPAddress = old.ClientIPAddress;