aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/RegionInfo.cs8
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs10
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs27
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs4
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs45
-rw-r--r--OpenSim/Services/Connectors/Land/LandServiceConnector.cs3
-rw-r--r--OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs4
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs55
-rw-r--r--OpenSim/Services/GridService/GridService.cs2
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs17
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs2
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs8
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs8
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs29
17 files changed, 88 insertions, 144 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 08d5398..949a289 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -116,7 +116,13 @@ namespace OpenSim.Framework
116 public string ServerURI 116 public string ServerURI
117 { 117 {
118 get { return m_serverURI; } 118 get { return m_serverURI; }
119 set { m_serverURI = value; } 119 set {
120 if ( value.EndsWith("/") ) {
121 m_serverURI = value;
122 } else {
123 m_serverURI = value + '/';
124 }
125 }
120 } 126 }
121 protected string m_serverURI; 127 protected string m_serverURI;
122 128
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 452df38..54e4a46 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -348,7 +348,7 @@ namespace OpenSim.Framework.Servers.HttpServer
348 { 348 {
349 try 349 try
350 { 350 {
351// m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl); 351 m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl);
352 352
353 Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); 353 Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true);
354 354
@@ -376,11 +376,11 @@ namespace OpenSim.Framework.Servers.HttpServer
376 string path = request.RawUrl; 376 string path = request.RawUrl;
377 string handlerKey = GetHandlerKey(request.HttpMethod, path); 377 string handlerKey = GetHandlerKey(request.HttpMethod, path);
378 378
379// m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); 379 m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path);
380 380
381 if (TryGetStreamHandler(handlerKey, out requestHandler)) 381 if (TryGetStreamHandler(handlerKey, out requestHandler))
382 { 382 {
383 //m_log.Debug("[BASE HTTP SERVER]: Found Stream Handler"); 383 m_log.Debug("[BASE HTTP SERVER]: Found Stream Handler");
384 // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. 384 // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler.
385 byte[] buffer = null; 385 byte[] buffer = null;
386 386
@@ -395,7 +395,7 @@ namespace OpenSim.Framework.Servers.HttpServer
395 } 395 }
396 else if (requestHandler is IGenericHTTPHandler) 396 else if (requestHandler is IGenericHTTPHandler)
397 { 397 {
398 //m_log.Debug("[BASE HTTP SERVER]: Found Caps based HTTP Handler"); 398 m_log.Debug("[BASE HTTP SERVER]: Found Caps based HTTP Handler");
399 IGenericHTTPHandler HTTPRequestHandler = requestHandler as IGenericHTTPHandler; 399 IGenericHTTPHandler HTTPRequestHandler = requestHandler as IGenericHTTPHandler;
400 Stream requestStream = request.InputStream; 400 Stream requestStream = request.InputStream;
401 401
@@ -422,7 +422,7 @@ namespace OpenSim.Framework.Servers.HttpServer
422 422
423 foreach (string headername in rHeaders) 423 foreach (string headername in rHeaders)
424 { 424 {
425 //m_log.Warn("[HEADER]: " + headername + "=" + request.Headers[headername]); 425 m_log.Warn("[HEADER]: " + headername + "=" + request.Headers[headername]);
426 headervals[headername] = request.Headers[headername]; 426 headervals[headername] = request.Headers[headername];
427 } 427 }
428 428
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 74ad168..904a50c 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -327,8 +327,8 @@ namespace OpenSim
327 //regionInfo.originRegionID = regionInfo.RegionID; 327 //regionInfo.originRegionID = regionInfo.RegionID;
328 328
329 // set initial ServerURI 329 // set initial ServerURI
330 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.InternalEndPoint.Port;
331 regionInfo.HttpPort = m_httpServerPort; 330 regionInfo.HttpPort = m_httpServerPort;
331 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/";
332 332
333 regionInfo.osSecret = m_osSecret; 333 regionInfo.osSecret = m_osSecret;
334 334
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index 918fa04..fdc48c6 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -599,7 +599,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
599 try 599 try
600 { 600 {
601 601
602 XmlRpcResponse GridResp = GridReq.Send("http://" + reginfo.ExternalHostName + ":" + reginfo.HttpPort, 3000); 602 XmlRpcResponse GridResp = GridReq.Send(reginfo.ServerURI, 3000);
603 603
604 Hashtable responseData = (Hashtable)GridResp.Value; 604 Hashtable responseData = (Hashtable)GridResp.Value;
605 605
@@ -621,8 +621,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
621 } 621 }
622 catch (WebException e) 622 catch (WebException e)
623 { 623 {
624 m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to http://{0}:{1} the host didn't respond ({2})", 624 m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to {0}} the host didn't respond ({2})",
625 reginfo.ExternalHostName, reginfo.HttpPort, e.Message); 625 reginfo.ServerURI, e.Message);
626 } 626 }
627 627
628 return false; 628 return false;
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 38fff1c..3791e1d 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -337,20 +337,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
337 if (sp.ClientView.TryGet(out ipepClient)) 337 if (sp.ClientView.TryGet(out ipepClient))
338 { 338 {
339 capsPath 339 capsPath
340 = "http://" 340 = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
341 + NetworkUtil.GetHostFor(ipepClient.EndPoint, finalDestination.ExternalHostName)
342 + ":"
343 + finalDestination.HttpPort
344 + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
345 } 341 }
346 else 342 else
347 { 343 {
348 capsPath 344 capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
349 = "http://"
350 + finalDestination.ExternalHostName
351 + ":"
352 + finalDestination.HttpPort
353 + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
354 } 345 }
355 #endregion 346 #endregion
356 347
@@ -382,8 +373,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
382 else 373 else
383 { 374 {
384 agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle); 375 agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle);
385 capsPath = "http://" + finalDestination.ExternalHostName + ":" + finalDestination.HttpPort 376 capsPath = finalDestination.ServerURI + "/CAPS/" + agentCircuit.CapsPath + "0000/";
386 + "/CAPS/" + agentCircuit.CapsPath + "0000/";
387 } 377 }
388 378
389 // Expect avatar crossing is a heavy-duty function at the destination. 379 // Expect avatar crossing is a heavy-duty function at the destination.
@@ -516,8 +506,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
516 506
517 protected virtual void SetCallbackURL(AgentData agent, RegionInfo region) 507 protected virtual void SetCallbackURL(AgentData agent, RegionInfo region)
518 { 508 {
519 agent.CallbackURI = "http://" + region.ExternalHostName + ":" + region.HttpPort + 509 agent.CallbackURI = region.ServerURI + "/agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/";
520 "/agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/";
521 510
522 } 511 }
523 512
@@ -842,7 +831,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
842 cAgent.Position = pos; 831 cAgent.Position = pos;
843 if (isFlying) 832 if (isFlying)
844 cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; 833 cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
845 cAgent.CallbackURI = "http://" + m_scene.RegionInfo.ExternalHostName + ":" + m_scene.RegionInfo.HttpPort + 834 cAgent.CallbackURI = m_scene.RegionInfo.ServerURI +
846 "/agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/"; 835 "/agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/";
847 836
848 if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) 837 if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent))
@@ -870,8 +859,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
870 } 859 }
871 // TODO Should construct this behind a method 860 // TODO Should construct this behind a method
872 string capsPath = 861 string capsPath =
873 "http://" + neighbourRegion.ExternalHostName + ":" + neighbourRegion.HttpPort 862 neighbourRegion.ServerURI + "/CAPS/" + agentcaps /*circuitdata.CapsPath*/ + "0000/";
874 + "/CAPS/" + agentcaps /*circuitdata.CapsPath*/ + "0000/";
875 863
876 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID); 864 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID);
877 865
@@ -1190,8 +1178,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1190 y = y / Constants.RegionSize; 1178 y = y / Constants.RegionSize;
1191 m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")"); 1179 m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")");
1192 1180
1193 string capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort 1181 string capsPath = reg.ServerURI + "/CAPS/" + a.CapsPath + "0000/";
1194 + "/CAPS/" + a.CapsPath + "0000/";
1195 1182
1196 string reason = String.Empty; 1183 string reason = String.Empty;
1197 1184
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index a182eea..fdbbccf 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
147 147
148 string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString(); 148 string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
149 regionimage = regionimage.Replace("-", ""); 149 regionimage = regionimage.Replace("-", "");
150 m_log.Info("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage); 150 m_log.Info("[WORLD MAP]: JPEG Map location: " + m_scene.RegionInfo.ServerURI + "/index.php?method=" + regionimage);
151 151
152 MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage); 152 MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
153 MainServer.Instance.AddLLSDHandler( 153 MainServer.Instance.AddLLSDHandler(
@@ -579,7 +579,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
579 579
580 if (mreg != null) 580 if (mreg != null)
581 { 581 {
582 httpserver = "http://" + mreg.ExternalEndPoint.Address.ToString() + ":" + mreg.HttpPort + "/MAP/MapItems/" + regionhandle.ToString(); 582 httpserver = mreg.ServerURI + "MAP/MapItems/" + regionhandle.ToString();
583 lock (m_cachedRegionMapItemsAddress) 583 lock (m_cachedRegionMapItemsAddress)
584 { 584 {
585 if (!m_cachedRegionMapItemsAddress.ContainsKey(regionhandle)) 585 if (!m_cachedRegionMapItemsAddress.ContainsKey(regionhandle))
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 479a80e..2b19b87 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -63,12 +63,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
63 63
64 protected override string AgentPath() 64 protected override string AgentPath()
65 { 65 {
66 return "/foreignagent/"; 66 return "foreignagent/";
67 } 67 }
68 68
69 protected override string ObjectPath() 69 protected override string ObjectPath()
70 { 70 {
71 return "/foreignobject/"; 71 return "foreignobject/";
72 } 72 }
73 73
74 public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string externalName, out string imageURL, out string reason) 74 public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string externalName, out string imageURL, out string reason)
@@ -86,12 +86,11 @@ namespace OpenSim.Services.Connectors.Hypergrid
86 paramList.Add(hash); 86 paramList.Add(hash);
87 87
88 XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); 88 XmlRpcRequest request = new XmlRpcRequest("link_region", paramList);
89 string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"); 89 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + info.ServerURI);
90 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri);
91 XmlRpcResponse response = null; 90 XmlRpcResponse response = null;
92 try 91 try
93 { 92 {
94 response = request.Send(uri, 10000); 93 response = request.Send(info.ServerURI, 10000);
95 } 94 }
96 catch (Exception e) 95 catch (Exception e)
97 { 96 {
@@ -108,8 +107,8 @@ namespace OpenSim.Services.Connectors.Hypergrid
108 } 107 }
109 108
110 hash = (Hashtable)response.Value; 109 hash = (Hashtable)response.Value;
111 //foreach (Object o in hash) 110 foreach (Object o in hash)
112 // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); 111 m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value);
113 try 112 try
114 { 113 {
115 bool success = false; 114 bool success = false;
@@ -117,16 +116,20 @@ namespace OpenSim.Services.Connectors.Hypergrid
117 if (success) 116 if (success)
118 { 117 {
119 UUID.TryParse((string)hash["uuid"], out regionID); 118 UUID.TryParse((string)hash["uuid"], out regionID);
120 //m_log.Debug(">> HERE, uuid: " + uuid); 119 m_log.Debug(">> HERE, uuid: " + regionID);
121 if ((string)hash["handle"] != null) 120 if ((string)hash["handle"] != null)
122 { 121 {
123 realHandle = Convert.ToUInt64((string)hash["handle"]); 122 realHandle = Convert.ToUInt64((string)hash["handle"]);
124 //m_log.Debug(">> HERE, realHandle: " + realHandle); 123 m_log.Debug(">> HERE, realHandle: " + realHandle);
125 } 124 }
126 if (hash["region_image"] != null) 125 if (hash["region_image"] != null) {
127 imageURL = (string)hash["region_image"]; 126 imageURL = (string)hash["region_image"];
128 if (hash["external_name"] != null) 127 m_log.Debug(">> HERE, imageURL: " + imageURL);
128 }
129 if (hash["external_name"] != null) {
129 externalName = (string)hash["external_name"]; 130 externalName = (string)hash["external_name"];
131 m_log.Debug(">> HERE, externalName: " + externalName);
132 }
130 } 133 }
131 134
132 } 135 }
@@ -188,12 +191,11 @@ namespace OpenSim.Services.Connectors.Hypergrid
188 paramList.Add(hash); 191 paramList.Add(hash);
189 192
190 XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); 193 XmlRpcRequest request = new XmlRpcRequest("get_region", paramList);
191 string uri = "http://" + ((gatekeeper.ServerURI != null && gatekeeper.ServerURI != string.Empty && !gatekeeper.ServerURI.StartsWith("http:")) ? gatekeeper.ServerURI : gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/"); 194 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + gatekeeper.ServerURI);
192 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri);
193 XmlRpcResponse response = null; 195 XmlRpcResponse response = null;
194 try 196 try
195 { 197 {
196 response = request.Send(uri, 10000); 198 response = request.Send(gatekeeper.ServerURI, 10000);
197 } 199 }
198 catch (Exception e) 200 catch (Exception e)
199 { 201 {
@@ -208,8 +210,8 @@ namespace OpenSim.Services.Connectors.Hypergrid
208 } 210 }
209 211
210 hash = (Hashtable)response.Value; 212 hash = (Hashtable)response.Value;
211 //foreach (Object o in hash) 213 foreach (Object o in hash)
212 // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); 214 m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value);
213 try 215 try
214 { 216 {
215 bool success = false; 217 bool success = false;
@@ -219,38 +221,41 @@ namespace OpenSim.Services.Connectors.Hypergrid
219 GridRegion region = new GridRegion(); 221 GridRegion region = new GridRegion();
220 222
221 UUID.TryParse((string)hash["uuid"], out region.RegionID); 223 UUID.TryParse((string)hash["uuid"], out region.RegionID);
222 //m_log.Debug(">> HERE, uuid: " + region.RegionID); 224 m_log.Debug(">> HERE, uuid: " + region.RegionID);
223 int n = 0; 225 int n = 0;
224 if (hash["x"] != null) 226 if (hash["x"] != null)
225 { 227 {
226 Int32.TryParse((string)hash["x"], out n); 228 Int32.TryParse((string)hash["x"], out n);
227 region.RegionLocX = n; 229 region.RegionLocX = n;
228 //m_log.Debug(">> HERE, x: " + region.RegionLocX); 230 m_log.Debug(">> HERE, x: " + region.RegionLocX);
229 } 231 }
230 if (hash["y"] != null) 232 if (hash["y"] != null)
231 { 233 {
232 Int32.TryParse((string)hash["y"], out n); 234 Int32.TryParse((string)hash["y"], out n);
233 region.RegionLocY = n; 235 region.RegionLocY = n;
234 //m_log.Debug(">> HERE, y: " + region.RegionLocY); 236 m_log.Debug(">> HERE, y: " + region.RegionLocY);
235 } 237 }
236 if (hash["region_name"] != null) 238 if (hash["region_name"] != null)
237 { 239 {
238 region.RegionName = (string)hash["region_name"]; 240 region.RegionName = (string)hash["region_name"];
239 //m_log.Debug(">> HERE, name: " + region.RegionName); 241 m_log.Debug(">> HERE, region_name: " + region.RegionName);
240 } 242 }
241 if (hash["hostname"] != null) 243 if (hash["hostname"] != null)
242 region.ExternalHostName = (string)hash["hostname"]; 244 region.ExternalHostName = (string)hash["hostname"];
245 m_log.Debug(">> HERE, hostname: " + region.ExternalHostName);
243 if (hash["http_port"] != null) 246 if (hash["http_port"] != null)
244 { 247 {
245 uint p = 0; 248 uint p = 0;
246 UInt32.TryParse((string)hash["http_port"], out p); 249 UInt32.TryParse((string)hash["http_port"], out p);
247 region.HttpPort = p; 250 region.HttpPort = p;
251 m_log.Debug(">> HERE, http_port: " + region.HttpPort);
248 } 252 }
249 if (hash["internal_port"] != null) 253 if (hash["internal_port"] != null)
250 { 254 {
251 int p = 0; 255 int p = 0;
252 Int32.TryParse((string)hash["internal_port"], out p); 256 Int32.TryParse((string)hash["internal_port"], out p);
253 region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p); 257 region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p);
258 m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint);
254 } 259 }
255 260
256 // Successful return 261 // Successful return
diff --git a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
index 8143b5a..4b25ac8 100644
--- a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
@@ -84,8 +84,7 @@ namespace OpenSim.Services.Connectors
84 if (info != null) // just to be sure 84 if (info != null) // just to be sure
85 { 85 {
86 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList); 86 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList);
87 string uri = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"; 87 XmlRpcResponse response = request.Send(info.ServerURI, 10000);
88 XmlRpcResponse response = request.Send(uri, 10000);
89 if (response.IsFault) 88 if (response.IsFault)
90 { 89 {
91 m_log.ErrorFormat("[LAND CONNECTOR]: remote call returned an error: {0}", response.FaultString); 90 m_log.ErrorFormat("[LAND CONNECTOR]: remote call returned an error: {0}", response.FaultString);
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
index 0a982f8..9c57a40 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Services.Connectors
87 87
88 public bool DoHelloNeighbourCall(GridRegion region, RegionInfo thisRegion) 88 public bool DoHelloNeighbourCall(GridRegion region, RegionInfo thisRegion)
89 { 89 {
90 string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/region/" + thisRegion.RegionID + "/"; 90 string uri = region.ServerURI + "/region/" + thisRegion.RegionID + "/";
91 //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri); 91 //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);
92 92
93 WebRequest HelloNeighbourRequest = WebRequest.Create(uri); 93 WebRequest HelloNeighbourRequest = WebRequest.Create(uri);
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index 168b233..8076fab 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -145,8 +145,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
145 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); 145 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
146 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0); 146 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
147 147
148 string httpAddress = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort + "/";
149
150 OSDMap extraData = new OSDMap 148 OSDMap extraData = new OSDMap
151 { 149 {
152 { "ServerURI", OSD.FromString(regionInfo.ServerURI) }, 150 { "ServerURI", OSD.FromString(regionInfo.ServerURI) },
@@ -168,7 +166,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
168 { "Name", regionInfo.RegionName }, 166 { "Name", regionInfo.RegionName },
169 { "MinPosition", minPosition.ToString() }, 167 { "MinPosition", minPosition.ToString() },
170 { "MaxPosition", maxPosition.ToString() }, 168 { "MaxPosition", maxPosition.ToString() },
171 { "Address", httpAddress }, 169 { "Address", regionInfo.ServerURI },
172 { "Enabled", "1" }, 170 { "Enabled", "1" },
173 { "ExtraData", OSDParser.SerializeJsonString(extraData) } 171 { "ExtraData", OSDParser.SerializeJsonString(extraData) }
174 }; 172 };
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index a5f748f..c4284eb 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Services.Connectors.Simulation
72 72
73 protected virtual string AgentPath() 73 protected virtual string AgentPath()
74 { 74 {
75 return "/agent/"; 75 return "agent/";
76 } 76 }
77 77
78 public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason) 78 public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason)
@@ -104,26 +104,7 @@ namespace OpenSim.Services.Connectors.Simulation
104 return false; 104 return false;
105 } 105 }
106 106
107 string uri = string.Empty; 107 string uri = destination.ServerURI + AgentPath() + aCircuit.AgentID + "/";
108
109 // HACK -- Simian grid make it work!!!
110 if (destination.ServerURI != null && destination.ServerURI != string.Empty && !destination.ServerURI.StartsWith("http:"))
111 uri = "http://" + destination.ServerURI + AgentPath() + aCircuit.AgentID + "/";
112 else
113 {
114 try
115 {
116 uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + aCircuit.AgentID + "/";
117 }
118 catch (Exception e)
119 {
120 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent create. Reason: " + e.Message);
121 reason = e.Message;
122 return false;
123 }
124 }
125
126 //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
127 108
128 AgentCreateRequest = (HttpWebRequest)WebRequest.Create(uri); 109 AgentCreateRequest = (HttpWebRequest)WebRequest.Create(uri);
129 AgentCreateRequest.Method = "POST"; 110 AgentCreateRequest.Method = "POST";
@@ -277,17 +258,7 @@ namespace OpenSim.Services.Connectors.Simulation
277 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData) 258 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData)
278 { 259 {
279 // Eventually, we want to use a caps url instead of the agentID 260 // Eventually, we want to use a caps url instead of the agentID
280 string uri = string.Empty; 261 string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";
281 try
282 {
283 uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + cAgentData.AgentID + "/";
284 }
285 catch (Exception e)
286 {
287 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent update. Reason: " + e.Message);
288 return false;
289 }
290 //Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri);
291 262
292 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri); 263 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
293 ChildUpdateRequest.Method = "PUT"; 264 ChildUpdateRequest.Method = "PUT";
@@ -385,8 +356,7 @@ namespace OpenSim.Services.Connectors.Simulation
385 { 356 {
386 agent = null; 357 agent = null;
387 // Eventually, we want to use a caps url instead of the agentID 358 // Eventually, we want to use a caps url instead of the agentID
388 string uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 359 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
389 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri);
390 360
391 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); 361 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
392 request.Method = "GET"; 362 request.Method = "GET";
@@ -407,7 +377,6 @@ namespace OpenSim.Services.Connectors.Simulation
407 sr = new StreamReader(webResponse.GetResponseStream()); 377 sr = new StreamReader(webResponse.GetResponseStream());
408 reply = sr.ReadToEnd().Trim(); 378 reply = sr.ReadToEnd().Trim();
409 379
410 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was " + reply);
411 380
412 } 381 }
413 catch (WebException ex) 382 catch (WebException ex)
@@ -428,7 +397,6 @@ namespace OpenSim.Services.Connectors.Simulation
428 OSDMap args = Util.GetOSDMap(reply); 397 OSDMap args = Util.GetOSDMap(reply);
429 if (args == null) 398 if (args == null)
430 { 399 {
431 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: Error getting OSDMap from reply");
432 return false; 400 return false;
433 } 401 }
434 402
@@ -437,7 +405,6 @@ namespace OpenSim.Services.Connectors.Simulation
437 return true; 405 return true;
438 } 406 }
439 407
440 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: DoRetrieveRootAgentCall returned status " + webResponse.StatusCode);
441 return false; 408 return false;
442 } 409 }
443 410
@@ -479,18 +446,8 @@ namespace OpenSim.Services.Connectors.Simulation
479 446
480 public bool CloseAgent(GridRegion destination, UUID id) 447 public bool CloseAgent(GridRegion destination, UUID id)
481 { 448 {
482 string uri = string.Empty; 449 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
483 try
484 {
485 uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
486 }
487 catch (Exception e)
488 {
489 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent close. Reason: " + e.Message);
490 return false;
491 }
492 450
493 //Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri);
494 451
495 WebRequest request = WebRequest.Create(uri); 452 WebRequest request = WebRequest.Create(uri);
496 request.Method = "DELETE"; 453 request.Method = "DELETE";
@@ -538,7 +495,7 @@ namespace OpenSim.Services.Connectors.Simulation
538 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) 495 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall)
539 { 496 {
540 string uri 497 string uri
541 = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/"; 498 = destination.ServerURI + ObjectPath() + sog.UUID + "/";
542 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri); 499 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri);
543 500
544 WebRequest ObjectCreateRequest = WebRequest.Create(uri); 501 WebRequest ObjectCreateRequest = WebRequest.Create(uri);
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index ce6f64b..add1be0 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -479,7 +479,7 @@ namespace OpenSim.Services.GridService
479 OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]); 479 OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]);
480 MainConsole.Instance.Output(String.Format("{0,-20} {1}\n{2,-20} {3}\n{4,-39} {5}\n\n", 480 MainConsole.Instance.Output(String.Format("{0,-20} {1}\n{2,-20} {3}\n{4,-39} {5}\n\n",
481 r.RegionName, r.RegionID, 481 r.RegionName, r.RegionID,
482 String.Format("{0},{1}", r.posX, r.posY), "http://" + r.Data["serverIP"].ToString() + ":" + r.Data["serverPort"].ToString(), 482 String.Format("{0},{1}", r.posX, r.posY), r.Data["serverURI"],
483 r.Data["owner_uuid"].ToString(), flags.ToString())); 483 r.Data["owner_uuid"].ToString(), flags.ToString()));
484 } 484 }
485 return; 485 return;
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index b86fb6f..11df7e0 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Services.GridService
127 if (MainConsole.Instance != null) 127 if (MainConsole.Instance != null)
128 { 128 {
129 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", 129 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
130 "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", 130 "link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RegionServerURI] [<RemoteRegionName>] <cr>",
131 "Link a hypergrid region", RunCommand); 131 "Link a hypergrid region", RunCommand);
132 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", 132 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region",
133 "unlink-region <local name> or <HostName>:<HttpPort> <cr>", 133 "unlink-region <local name> or <HostName>:<HttpPort> <cr>",
@@ -199,10 +199,19 @@ namespace OpenSim.Services.GridService
199 return null; 199 return null;
200 } 200 }
201 201
202 public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string externalRegionName, string serverURI, out GridRegion regInfo, out string reason)
203 {
204 return TryCreateLink(scopeID, xloc, yloc, externalRegionName, 0, null, serverURI, out regInfo, out reason);
205 }
206
207 public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason)
208 {
209 return TryCreateLink(scopeID, xloc, yloc, externalRegionName, externalPort, externalHostName, null, out regInfo, out reason);
210 }
202 211
203 // From the command line and the 2 above 212 // From the command line and the 2 above
204 public bool TryCreateLink(UUID scopeID, int xloc, int yloc, 213 public bool TryCreateLink(UUID scopeID, int xloc, int yloc,
205 string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason) 214 string externalRegionName, uint externalPort, string externalHostName, string serverURI, out GridRegion regInfo, out string reason)
206 { 215 {
207 m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, externalRegionName, xloc, yloc); 216 m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, externalRegionName, xloc, yloc);
208 217
@@ -509,12 +518,16 @@ namespace OpenSim.Services.GridService
509 int xloc, yloc; 518 int xloc, yloc;
510 uint externalPort; 519 uint externalPort;
511 string externalHostName; 520 string externalHostName;
521 string serverURI;
512 try 522 try
513 { 523 {
514 xloc = Convert.ToInt32(cmdparams[0]); 524 xloc = Convert.ToInt32(cmdparams[0]);
515 yloc = Convert.ToInt32(cmdparams[1]); 525 yloc = Convert.ToInt32(cmdparams[1]);
516 externalPort = Convert.ToUInt32(cmdparams[3]); 526 externalPort = Convert.ToUInt32(cmdparams[3]);
517 externalHostName = cmdparams[2]; 527 externalHostName = cmdparams[2];
528 if ( cmdparams.Length == 4 ) {
529
530 }
518 //internalPort = Convert.ToUInt32(cmdparams[4]); 531 //internalPort = Convert.ToUInt32(cmdparams[4]);
519 //remotingPort = Convert.ToUInt32(cmdparams[5]); 532 //remotingPort = Convert.ToUInt32(cmdparams[5]);
520 } 533 }
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 3f5c4f1..9e96163 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..d5dda11 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -145,12 +145,12 @@ namespace OpenSim.Services.HypergridService
145 region.RegionLocY = finalDestination.RegionLocY; 145 region.RegionLocY = finalDestination.RegionLocY;
146 146
147 // Generate a new service session 147 // Generate a new service session
148 agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random(); 148 agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random();
149 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); 149 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
150 150
151 bool success = false; 151 bool success = false;
152 string myExternalIP = string.Empty; 152 string myExternalIP = string.Empty;
153 string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort; 153 string gridName = gatekeeper.ServerURI;
154 if (m_GridName == gridName) 154 if (m_GridName == gridName)
155 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); 155 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
156 else 156 else
@@ -159,7 +159,7 @@ namespace OpenSim.Services.HypergridService
159 if (!success) 159 if (!success)
160 { 160 {
161 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}",
162 agentCircuit.firstname, agentCircuit.lastname, region.ExternalHostName + ":" + region.HttpPort, reason); 162 agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason);
163 163
164 // restore the old travel info 164 // restore the old travel info
165 lock (m_TravelingAgents) 165 lock (m_TravelingAgents)
@@ -210,7 +210,7 @@ namespace OpenSim.Services.HypergridService
210 m_TravelingAgents[agentCircuit.SessionID] = travel; 210 m_TravelingAgents[agentCircuit.SessionID] = travel;
211 } 211 }
212 travel.UserID = agentCircuit.AgentID; 212 travel.UserID = agentCircuit.AgentID;
213 travel.GridExternalName = "http://" + region.ExternalHostName + ":" + region.HttpPort; 213 travel.GridExternalName = region.ServerURI;
214 travel.ServiceToken = agentCircuit.ServiceSessionID; 214 travel.ServiceToken = agentCircuit.ServiceSessionID;
215 if (old != null) 215 if (old != null)
216 travel.ClientIPAddress = old.ClientIPAddress; 216 travel.ClientIPAddress = old.ClientIPAddress;
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 77230a3..bf441e6 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -116,7 +116,13 @@ namespace OpenSim.Services.Interfaces
116 public string ServerURI 116 public string ServerURI
117 { 117 {
118 get { return m_serverURI; } 118 get { return m_serverURI; }
119 set { m_serverURI = value; } 119 set {
120 if ( value.EndsWith("/") ) {
121 m_serverURI = value;
122 } else {
123 m_serverURI = value + '/';
124 }
125 }
120 } 126 }
121 protected string m_serverURI; 127 protected string m_serverURI;
122 128
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index 0da1715..f985ab2 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -333,34 +333,7 @@ namespace OpenSim.Services.LLLoginService
333 333
334 private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient) 334 private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient)
335 { 335 {
336 string capsSeedPath = String.Empty; 336 SeedCapability = destination.ServerURI + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath);
337
338 // Don't use the following! It Fails for logging into any region not on the same port as the http server!
339 // Kept here so it doesn't happen again!
340 // response.SeedCapability = regionInfo.ServerURI + capsSeedPath;
341
342 #region IP Translation for NAT
343 if (ipepClient != null)
344 {
345 capsSeedPath
346 = "http://"
347 + NetworkUtil.GetHostFor(ipepClient.Address, destination.ExternalHostName)
348 + ":"
349 + destination.HttpPort
350 + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath);
351 }
352 else
353 {
354 capsSeedPath
355 = "http://"
356 + destination.ExternalHostName
357 + ":"
358 + destination.HttpPort
359 + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath);
360 }
361 #endregion
362
363 SeedCapability = capsSeedPath;
364 } 337 }
365 338
366 private void SetDefaultValues() 339 private void SetDefaultValues()