aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-10-22 23:34:53 +0100
committerJustin Clark-Casey (justincc)2010-10-22 23:34:53 +0100
commit783b1b548f24b002f09cf2ceb0bdab76afed0fab (patch)
tree04313ccfa480e5d6b990d793b7240e7a013a4b56 /OpenSim
parentRevert "* more url / hg cleanup" (diff)
downloadopensim-SC-783b1b548f24b002f09cf2ceb0bdab76afed0fab.zip
opensim-SC-783b1b548f24b002f09cf2ceb0bdab76afed0fab.tar.gz
opensim-SC-783b1b548f24b002f09cf2ceb0bdab76afed0fab.tar.bz2
opensim-SC-783b1b548f24b002f09cf2ceb0bdab76afed0fab.tar.xz
Revert "* additional serveruri cleanup"
This reverts commit 19119d7705f8381a3c207d0e64a23243215a12b9.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs2
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs14
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs10
-rw-r--r--OpenSim/Services/GridService/GridService.cs2
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs9
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs29
8 files changed, 54 insertions, 20 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 904a50c..f30a850 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -328,7 +328,7 @@ namespace OpenSim
328 328
329 // set initial ServerURI 329 // set initial ServerURI
330 regionInfo.HttpPort = m_httpServerPort; 330 regionInfo.HttpPort = m_httpServerPort;
331 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/"; 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 fdc48c6..918fa04 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(reginfo.ServerURI, 3000); 602 XmlRpcResponse GridResp = GridReq.Send("http://" + reginfo.ExternalHostName + ":" + reginfo.HttpPort, 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 {0}} the host didn't respond ({2})", 624 m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to http://{0}:{1} the host didn't respond ({2})",
625 reginfo.ServerURI, e.Message); 625 reginfo.ExternalHostName, reginfo.HttpPort, e.Message);
626 } 626 }
627 627
628 return false; 628 return false;
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index fdbbccf..3ce964a 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -579,7 +579,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
579 579
580 if (mreg != null) 580 if (mreg != null)
581 { 581 {
582 httpserver = mreg.ServerURI + "MAP/MapItems/" + regionhandle.ToString(); 582 httpserver = "http://" + mreg.ExternalEndPoint.Address.ToString() + ":" + mreg.HttpPort + "/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 2b19b87..89a8f7a 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,11 +86,12 @@ 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 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + info.ServerURI); 89 string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/");
90 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri);
90 XmlRpcResponse response = null; 91 XmlRpcResponse response = null;
91 try 92 try
92 { 93 {
93 response = request.Send(info.ServerURI, 10000); 94 response = request.Send(uri, 10000);
94 } 95 }
95 catch (Exception e) 96 catch (Exception e)
96 { 97 {
@@ -191,11 +192,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
191 paramList.Add(hash); 192 paramList.Add(hash);
192 193
193 XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); 194 XmlRpcRequest request = new XmlRpcRequest("get_region", paramList);
194 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + gatekeeper.ServerURI); 195 string uri = "http://" + ((gatekeeper.ServerURI != null && gatekeeper.ServerURI != string.Empty && !gatekeeper.ServerURI.StartsWith("http:")) ? gatekeeper.ServerURI : gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/");
196 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri);
195 XmlRpcResponse response = null; 197 XmlRpcResponse response = null;
196 try 198 try
197 { 199 {
198 response = request.Send(gatekeeper.ServerURI, 10000); 200 response = request.Send(uri, 10000);
199 } 201 }
200 catch (Exception e) 202 catch (Exception e)
201 { 203 {
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index c4284eb..07839d3 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)
@@ -106,6 +106,8 @@ namespace OpenSim.Services.Connectors.Simulation
106 106
107 string uri = destination.ServerURI + AgentPath() + aCircuit.AgentID + "/"; 107 string uri = destination.ServerURI + AgentPath() + aCircuit.AgentID + "/";
108 108
109 //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
110
109 AgentCreateRequest = (HttpWebRequest)WebRequest.Create(uri); 111 AgentCreateRequest = (HttpWebRequest)WebRequest.Create(uri);
110 AgentCreateRequest.Method = "POST"; 112 AgentCreateRequest.Method = "POST";
111 AgentCreateRequest.ContentType = "application/json"; 113 AgentCreateRequest.ContentType = "application/json";
@@ -259,6 +261,7 @@ namespace OpenSim.Services.Connectors.Simulation
259 { 261 {
260 // Eventually, we want to use a caps url instead of the agentID 262 // Eventually, we want to use a caps url instead of the agentID
261 string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/"; 263 string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";
264 //Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri);
262 265
263 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri); 266 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
264 ChildUpdateRequest.Method = "PUT"; 267 ChildUpdateRequest.Method = "PUT";
@@ -357,6 +360,7 @@ namespace OpenSim.Services.Connectors.Simulation
357 agent = null; 360 agent = null;
358 // Eventually, we want to use a caps url instead of the agentID 361 // Eventually, we want to use a caps url instead of the agentID
359 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 362 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
363 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri);
360 364
361 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); 365 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
362 request.Method = "GET"; 366 request.Method = "GET";
@@ -377,6 +381,7 @@ namespace OpenSim.Services.Connectors.Simulation
377 sr = new StreamReader(webResponse.GetResponseStream()); 381 sr = new StreamReader(webResponse.GetResponseStream());
378 reply = sr.ReadToEnd().Trim(); 382 reply = sr.ReadToEnd().Trim();
379 383
384 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was " + reply);
380 385
381 } 386 }
382 catch (WebException ex) 387 catch (WebException ex)
@@ -397,6 +402,7 @@ namespace OpenSim.Services.Connectors.Simulation
397 OSDMap args = Util.GetOSDMap(reply); 402 OSDMap args = Util.GetOSDMap(reply);
398 if (args == null) 403 if (args == null)
399 { 404 {
405 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: Error getting OSDMap from reply");
400 return false; 406 return false;
401 } 407 }
402 408
@@ -405,6 +411,7 @@ namespace OpenSim.Services.Connectors.Simulation
405 return true; 411 return true;
406 } 412 }
407 413
414 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: DoRetrieveRootAgentCall returned status " + webResponse.StatusCode);
408 return false; 415 return false;
409 } 416 }
410 417
@@ -448,6 +455,7 @@ namespace OpenSim.Services.Connectors.Simulation
448 { 455 {
449 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 456 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
450 457
458 //Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri);
451 459
452 WebRequest request = WebRequest.Create(uri); 460 WebRequest request = WebRequest.Create(uri);
453 request.Method = "DELETE"; 461 request.Method = "DELETE";
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 125c2be..e7988d6 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), r.Data["serverURI"], 482 String.Format("{0},{1}", r.posX, r.posY), "http://" + r.Data["serverIP"].ToString() + ":" + r.Data["serverPort"].ToString(),
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 11df7e0..757ae80 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -199,14 +199,11 @@ 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 202
207 public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason) 203 public bool TryCreateLink(UUID scopeID, int xloc, int yloc,
204 string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason)
208 { 205 {
209 return TryCreateLink(scopeID, xloc, yloc, externalRegionName, externalPort, externalHostName, null, out regInfo, out reason); 206 TryCreateLink(scopeID, xloc, yloc, externalRegionName, externalPort, externalHostName, null, regInfo, reason);
210 } 207 }
211 208
212 // From the command line and the 2 above 209 // From the command line and the 2 above
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index f985ab2..0da1715 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -333,7 +333,34 @@ 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 SeedCapability = destination.ServerURI + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath); 336 string capsSeedPath = String.Empty;
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;
337 } 364 }
338 365
339 private void SetDefaultValues() 366 private void SetDefaultValues()