aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs50
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs2
-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.cs57
-rw-r--r--OpenSim/Services/GridService/GridService.cs2
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs109
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs2
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs20
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs17
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs29
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs7
13 files changed, 151 insertions, 153 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 479a80e..70bafda 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 {
@@ -219,38 +221,48 @@ 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);
246 }
243 if (hash["http_port"] != null) 247 if (hash["http_port"] != null)
244 { 248 {
245 uint p = 0; 249 uint p = 0;
246 UInt32.TryParse((string)hash["http_port"], out p); 250 UInt32.TryParse((string)hash["http_port"], out p);
247 region.HttpPort = p; 251 region.HttpPort = p;
252 m_log.Debug(">> HERE, http_port: " + region.HttpPort);
248 } 253 }
249 if (hash["internal_port"] != null) 254 if (hash["internal_port"] != null)
250 { 255 {
251 int p = 0; 256 int p = 0;
252 Int32.TryParse((string)hash["internal_port"], out p); 257 Int32.TryParse((string)hash["internal_port"], out p);
253 region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p); 258 region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p);
259 m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint);
260 }
261
262 if (hash["server_uri"] != null)
263 {
264 region.ServerURI = (string) hash["server_uri"];
265 m_log.Debug(">> HERE, server_uri: " + region.ServerURI);
254 } 266 }
255 267
256 // Successful return 268 // Successful return
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index 247dd7e..0c41935 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -232,12 +232,14 @@ namespace OpenSim.Services.Connectors.Hypergrid
232 m_log.Debug("[USER AGENT CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); 232 m_log.Debug("[USER AGENT CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
233 } 233 }
234 // Add the input arguments 234 // Add the input arguments
235 args["gatekeeper_serveruri"] = OSD.FromString(gatekeeper.ServerURI);
235 args["gatekeeper_host"] = OSD.FromString(gatekeeper.ExternalHostName); 236 args["gatekeeper_host"] = OSD.FromString(gatekeeper.ExternalHostName);
236 args["gatekeeper_port"] = OSD.FromString(gatekeeper.HttpPort.ToString()); 237 args["gatekeeper_port"] = OSD.FromString(gatekeeper.HttpPort.ToString());
237 args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); 238 args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
238 args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); 239 args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
239 args["destination_name"] = OSD.FromString(destination.RegionName); 240 args["destination_name"] = OSD.FromString(destination.RegionName);
240 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 241 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
242 args["destination_serveruri"] = OSD.FromString(destination.ServerURI);
241 243
242 // 10/3/2010 244 // 10/3/2010
243 // I added the client_ip up to the regular AgentCircuitData, so this doesn't need to be here. 245 // I added the client_ip up to the regular AgentCircuitData, so this doesn't need to be here.
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 502fc82..7936cb8 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.Error("[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,8 @@ 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
281 try 262 string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";
282 {
283 uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + cAgentData.AgentID + "/";
284 }
285 catch (Exception e)
286 {
287 m_log.Warn("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent update. Reason: " + e.Message);
288 return false;
289 }
290 //Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri);
291 263
292 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri); 264 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
293 ChildUpdateRequest.Method = "PUT"; 265 ChildUpdateRequest.Method = "PUT";
@@ -385,8 +357,7 @@ namespace OpenSim.Services.Connectors.Simulation
385 { 357 {
386 agent = null; 358 agent = null;
387 // Eventually, we want to use a caps url instead of the agentID 359 // 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() + "/"; 360 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
389 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri);
390 361
391 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); 362 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
392 request.Method = "GET"; 363 request.Method = "GET";
@@ -407,7 +378,6 @@ namespace OpenSim.Services.Connectors.Simulation
407 sr = new StreamReader(webResponse.GetResponseStream()); 378 sr = new StreamReader(webResponse.GetResponseStream());
408 reply = sr.ReadToEnd().Trim(); 379 reply = sr.ReadToEnd().Trim();
409 380
410 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was " + reply);
411 381
412 } 382 }
413 catch (WebException ex) 383 catch (WebException ex)
@@ -428,7 +398,6 @@ namespace OpenSim.Services.Connectors.Simulation
428 OSDMap args = Util.GetOSDMap(reply); 398 OSDMap args = Util.GetOSDMap(reply);
429 if (args == null) 399 if (args == null)
430 { 400 {
431 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: Error getting OSDMap from reply");
432 return false; 401 return false;
433 } 402 }
434 403
@@ -437,7 +406,6 @@ namespace OpenSim.Services.Connectors.Simulation
437 return true; 406 return true;
438 } 407 }
439 408
440 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: DoRetrieveRootAgentCall returned status " + webResponse.StatusCode);
441 return false; 409 return false;
442 } 410 }
443 411
@@ -479,18 +447,7 @@ namespace OpenSim.Services.Connectors.Simulation
479 447
480 public bool CloseAgent(GridRegion destination, UUID id) 448 public bool CloseAgent(GridRegion destination, UUID id)
481 { 449 {
482 string uri = string.Empty; 450 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.Warn("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent close. Reason: " + e.Message);
490 return false;
491 }
492
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 e7988d6..125c2be 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 a67404f..eed3207 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -127,11 +127,12 @@ namespace OpenSim.Services.GridService
127 127
128 if (MainConsole.Instance != null) 128 if (MainConsole.Instance != null)
129 { 129 {
130 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region <Xloc> <Yloc> <ServerURI> [<RemoteRegionName>]", "Link a HyperGrid Region", RunCommand);
130 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", 131 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
131 "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", 132 "link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RemoteRegionName>]",
132 "Link a hypergrid region", RunCommand); 133 "Link a hypergrid region (deprecated)", RunCommand);
133 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", 134 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region",
134 "unlink-region <local name> or <HostName>:<HttpPort> <cr>", 135 "unlink-region <local name>",
135 "Unlink a hypergrid region", RunCommand); 136 "Unlink a hypergrid region", RunCommand);
136 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", 137 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
137 "Set local coordinate to map HG regions to", RunCommand); 138 "Set local coordinate to map HG regions to", RunCommand);
@@ -204,30 +205,37 @@ namespace OpenSim.Services.GridService
204 205
205 return null; 206 return null;
206 } 207 }
207 208
208 209 public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, UUID ownerID, out GridRegion regInfo, out string reason)
209 // From the command line and the 2 above 210 {
210 public bool TryCreateLink(UUID scopeID, int xloc, int yloc, 211 return TryCreateLink(scopeID, xloc, yloc, remoteRegionName, externalPort, externalHostName, null, ownerID, out regInfo, out reason);
211 string externalRegionName, uint externalPort, string externalHostName, UUID ownerID, 212 }
212 out GridRegion regInfo, out string reason) 213
214 public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, string serverURI, UUID ownerID, out GridRegion regInfo, out string reason)
213 { 215 {
214 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, remoteRegionName, xloc, yloc);
215 217
216 reason = string.Empty; 218 reason = string.Empty;
217 regInfo = new GridRegion(); 219 regInfo = new GridRegion();
218 regInfo.RegionName = externalRegionName; 220 if ( externalPort > 0)
219 regInfo.HttpPort = externalPort; 221 regInfo.HttpPort = externalPort;
220 regInfo.ExternalHostName = externalHostName; 222 else
223 regInfo.HttpPort = 0;
224 if ( externalHostName != null)
225 regInfo.ExternalHostName = externalHostName;
226 else
227 regInfo.ExternalHostName = "0.0.0.0";
228 if ( serverURI != null)
229 regInfo.ServerURI = serverURI;
230
231 if ( remoteRegionName != string.Empty )
232 regInfo.RegionName = remoteRegionName;
233
221 regInfo.RegionLocX = xloc; 234 regInfo.RegionLocX = xloc;
222 regInfo.RegionLocY = yloc; 235 regInfo.RegionLocY = yloc;
223 regInfo.ScopeID = scopeID; 236 regInfo.ScopeID = scopeID;
224 regInfo.EstateOwner = ownerID; 237 regInfo.EstateOwner = ownerID;
225 238
226 // Big HACK for Simian Grid !!!
227 // We need to clean up all URLs used in OpenSim !!!
228 if (externalHostName.Contains("/"))
229 regInfo.ServerURI = externalHostName;
230
231 // Check for free coordinates 239 // Check for free coordinates
232 GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY); 240 GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY);
233 if (region != null) 241 if (region != null)
@@ -267,9 +275,14 @@ namespace OpenSim.Services.GridService
267 } 275 }
268 276
269 regInfo.RegionID = regionID; 277 regInfo.RegionID = regionID;
270 if (regInfo.RegionName == string.Empty)
271 regInfo.RegionName = regInfo.ExternalHostName;
272 278
279 if ( externalName == string.Empty )
280 regInfo.RegionName = regInfo.ServerURI;
281 else
282 regInfo.RegionName = externalName;
283
284 m_log.Debug("naming linked region " + regInfo.RegionName);
285
273 // Try get the map image 286 // Try get the map image
274 //regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL); 287 //regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
275 // I need a texture that works for this... the one I tried doesn't seem to be working 288 // I need a texture that works for this... the one I tried doesn't seem to be working
@@ -316,13 +329,6 @@ namespace OpenSim.Services.GridService
316 } 329 }
317 } 330 }
318 331
319 //foreach (GridRegion r in m_HyperlinkRegions.Values)
320 //{
321 // m_log.DebugFormat("XXX Comparing {0}:{1} with {2}:{3}", host, port, r.ExternalHostName, r.HttpPort);
322 // if (host.Equals(r.ExternalHostName) && (port == r.HttpPort))
323 // regInfo = r;
324 //}
325
326 if (regInfo != null) 332 if (regInfo != null)
327 { 333 {
328 RemoveHyperlinkRegion(regInfo.RegionID); 334 RemoveHyperlinkRegion(regInfo.RegionID);
@@ -442,6 +448,21 @@ namespace OpenSim.Services.GridService
442 RunHGCommand(command, cmdparams); 448 RunHGCommand(command, cmdparams);
443 449
444 } 450 }
451
452 private void RunLinkRegionCommand(string[] cmdparams)
453 {
454 int xloc, yloc;
455 string serverURI;
456 string remoteName = null;
457 xloc = Convert.ToInt32(cmdparams[0]) * (int)Constants.RegionSize;
458 yloc = Convert.ToInt32(cmdparams[1]) * (int)Constants.RegionSize;
459 serverURI = cmdparams[2];
460 if (cmdparams.Length == 4)
461 remoteName = cmdparams[3];
462 string reason = string.Empty;
463 GridRegion regInfo;
464 TryCreateLink(UUID.Zero, xloc, yloc, remoteName, 0, null, serverURI, UUID.Zero, out regInfo, out reason);
465 }
445 466
446 private void RunHGCommand(string command, string[] cmdparams) 467 private void RunHGCommand(string command, string[] cmdparams)
447 { 468 {
@@ -465,6 +486,18 @@ namespace OpenSim.Services.GridService
465 } 486 }
466 else if (command.Equals("link-region")) 487 else if (command.Equals("link-region"))
467 { 488 {
489 if (cmdparams.Length > 0 && cmdparams.Length < 5)
490 {
491 RunLinkRegionCommand(cmdparams);
492 }
493 else
494 {
495 LinkRegionCmdUsage();
496 }
497 return;
498 }
499 else if (command.Equals("link-region"))
500 {
468 if (cmdparams.Length < 3) 501 if (cmdparams.Length < 3)
469 { 502 {
470 if ((cmdparams.Length == 1) || (cmdparams.Length == 2)) 503 if ((cmdparams.Length == 1) || (cmdparams.Length == 2))
@@ -478,7 +511,11 @@ namespace OpenSim.Services.GridService
478 return; 511 return;
479 } 512 }
480 513
481 if (cmdparams[2].Contains(":")) 514 //this should be the prefererred way of setting up hg links now
515 if ( cmdparams[2].StartsWith("http") && ( cmdparams.Length >= 3 && cmdparams.Length <= 5 )) {
516 RunLinkRegionCommand(cmdparams);
517 }
518 else if (cmdparams[2].Contains(":"))
482 { 519 {
483 // New format 520 // New format
484 int xloc, yloc; 521 int xloc, yloc;
@@ -517,12 +554,16 @@ namespace OpenSim.Services.GridService
517 int xloc, yloc; 554 int xloc, yloc;
518 uint externalPort; 555 uint externalPort;
519 string externalHostName; 556 string externalHostName;
557 string serverURI;
520 try 558 try
521 { 559 {
522 xloc = Convert.ToInt32(cmdparams[0]); 560 xloc = Convert.ToInt32(cmdparams[0]);
523 yloc = Convert.ToInt32(cmdparams[1]); 561 yloc = Convert.ToInt32(cmdparams[1]);
524 externalPort = Convert.ToUInt32(cmdparams[3]); 562 externalPort = Convert.ToUInt32(cmdparams[3]);
525 externalHostName = cmdparams[2]; 563 externalHostName = cmdparams[2];
564 if ( cmdparams.Length == 4 ) {
565
566 }
526 //internalPort = Convert.ToUInt32(cmdparams[4]); 567 //internalPort = Convert.ToUInt32(cmdparams[4]);
527 //remotingPort = Convert.ToUInt32(cmdparams[5]); 568 //remotingPort = Convert.ToUInt32(cmdparams[5]);
528 } 569 }
@@ -537,7 +578,7 @@ namespace OpenSim.Services.GridService
537 xloc = xloc * (int)Constants.RegionSize; 578 xloc = xloc * (int)Constants.RegionSize;
538 yloc = yloc * (int)Constants.RegionSize; 579 yloc = yloc * (int)Constants.RegionSize;
539 string reason = string.Empty; 580 string reason = string.Empty;
540 if (TryCreateLink(UUID.Zero, xloc, yloc, "", externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) 581 if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason))
541 { 582 {
542 if (cmdparams.Length >= 5) 583 if (cmdparams.Length >= 5)
543 { 584 {
@@ -551,7 +592,7 @@ namespace OpenSim.Services.GridService
551 } 592 }
552 else if (command.Equals("unlink-region")) 593 else if (command.Equals("unlink-region"))
553 { 594 {
554 if (cmdparams.Length < 1) 595 if (cmdparams.Length < 1 || cmdparams.Length > 1)
555 { 596 {
556 UnlinkRegionCmdUsage(); 597 UnlinkRegionCmdUsage();
557 return; 598 return;
@@ -639,7 +680,7 @@ namespace OpenSim.Services.GridService
639 xloc = xloc * (int)Constants.RegionSize; 680 xloc = xloc * (int)Constants.RegionSize;
640 yloc = yloc * (int)Constants.RegionSize; 681 yloc = yloc * (int)Constants.RegionSize;
641 string reason = string.Empty; 682 string reason = string.Empty;
642 if (TryCreateLink(UUID.Zero, xloc, yloc, "", externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) 683 if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason))
643 { 684 {
644 regInfo.RegionName = config.GetString("localName", ""); 685 regInfo.RegionName = config.GetString("localName", "");
645 } 686 }
@@ -651,14 +692,14 @@ namespace OpenSim.Services.GridService
651 692
652 private void LinkRegionCmdUsage() 693 private void LinkRegionCmdUsage()
653 { 694 {
654 MainConsole.Instance.Output("Usage: link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>]"); 695 MainConsole.Instance.Output("Usage: link-region <Xloc> <Yloc> <ServerURI> [<RemoteRegionName>]");
655 MainConsole.Instance.Output("Usage: link-region <Xloc> <Yloc> <HostName> <HttpPort> [<LocalName>]"); 696 MainConsole.Instance.Output("Usage (deprecated): link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>]");
697 MainConsole.Instance.Output("Usage (deprecated): link-region <Xloc> <Yloc> <HostName> <HttpPort> [<LocalName>]");
656 MainConsole.Instance.Output("Usage: link-region <URI_of_xml> [<exclude>]"); 698 MainConsole.Instance.Output("Usage: link-region <URI_of_xml> [<exclude>]");
657 } 699 }
658 700
659 private void UnlinkRegionCmdUsage() 701 private void UnlinkRegionCmdUsage()
660 { 702 {
661 MainConsole.Instance.Output("Usage: unlink-region <HostName>:<HttpPort>");
662 MainConsole.Instance.Output("Usage: unlink-region <LocalName>"); 703 MainConsole.Instance.Output("Usage: unlink-region <LocalName>");
663 } 704 }
664 705
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..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;
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 77230a3..6d3bff7 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -115,8 +115,20 @@ namespace OpenSim.Services.Interfaces
115 /// </summary> 115 /// </summary>
116 public string ServerURI 116 public string ServerURI
117 { 117 {
118 get { return m_serverURI; } 118 get {
119 set { m_serverURI = value; } 119 if ( m_serverURI != string.Empty ) {
120 return m_serverURI;
121 } else {
122 return "http://" + m_externalHostName + ":" + m_httpPort + "/";
123 }
124 }
125 set {
126 if ( value.EndsWith("/") ) {
127 m_serverURI = value;
128 } else {
129 m_serverURI = value + '/';
130 }
131 }
120 } 132 }
121 protected string m_serverURI; 133 protected string m_serverURI;
122 134
@@ -164,6 +176,7 @@ namespace OpenSim.Services.Interfaces
164 176
165 public GridRegion() 177 public GridRegion()
166 { 178 {
179 m_serverURI = string.Empty;
167 } 180 }
168 181
169 public GridRegion(int regionLocX, int regionLocY, IPEndPoint internalEndPoint, string externalUri) 182 public GridRegion(int regionLocX, int regionLocY, IPEndPoint internalEndPoint, string externalUri)
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()
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index a06476e..f6ee9ac 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -566,6 +566,7 @@ namespace OpenSim.Services.LLLoginService
566 566
567 private GridRegion FindForeignRegion(string domainName, uint port, string regionName, out GridRegion gatekeeper) 567 private GridRegion FindForeignRegion(string domainName, uint port, string regionName, out GridRegion gatekeeper)
568 { 568 {
569 m_log.Debug("attempting to findforeignregion " + domainName + ":" + port.ToString() + ":" + regionName);
569 gatekeeper = new GridRegion(); 570 gatekeeper = new GridRegion();
570 gatekeeper.ExternalHostName = domainName; 571 gatekeeper.ExternalHostName = domainName;
571 gatekeeper.HttpPort = port; 572 gatekeeper.HttpPort = port;
@@ -631,11 +632,9 @@ namespace OpenSim.Services.LLLoginService
631 gatekeeper = new GridRegion(destination); 632 gatekeeper = new GridRegion(destination);
632 gatekeeper.ExternalHostName = hostName; 633 gatekeeper.ExternalHostName = hostName;
633 gatekeeper.HttpPort = (uint)port; 634 gatekeeper.HttpPort = (uint)port;
634 635 gatekeeper.ServerURI = m_GatekeeperURL;
635 }
636 else // login to foreign grid
637 {
638 } 636 }
637 m_log.Debug("no gatekeeper detected..... using " + m_GatekeeperURL);
639 } 638 }
640 639
641 bool success = false; 640 bool success = false;