* additional serveruri cleanup
parent
55974df14b
commit
19119d7705
|
@ -328,7 +328,7 @@ namespace OpenSim
|
||||||
|
|
||||||
// set initial ServerURI
|
// set initial ServerURI
|
||||||
regionInfo.HttpPort = m_httpServerPort;
|
regionInfo.HttpPort = m_httpServerPort;
|
||||||
regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString();
|
regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/";
|
||||||
|
|
||||||
regionInfo.osSecret = m_osSecret;
|
regionInfo.osSecret = m_osSecret;
|
||||||
|
|
||||||
|
|
|
@ -599,7 +599,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
XmlRpcResponse GridResp = GridReq.Send("http://" + reginfo.ExternalHostName + ":" + reginfo.HttpPort, 3000);
|
XmlRpcResponse GridResp = GridReq.Send(reginfo.ServerURI, 3000);
|
||||||
|
|
||||||
Hashtable responseData = (Hashtable)GridResp.Value;
|
Hashtable responseData = (Hashtable)GridResp.Value;
|
||||||
|
|
||||||
|
@ -621,8 +621,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
}
|
}
|
||||||
catch (WebException e)
|
catch (WebException e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to http://{0}:{1} the host didn't respond ({2})",
|
m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to {0}} the host didn't respond ({2})",
|
||||||
reginfo.ExternalHostName, reginfo.HttpPort, e.Message);
|
reginfo.ServerURI, e.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -579,7 +579,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
|
|
||||||
if (mreg != null)
|
if (mreg != null)
|
||||||
{
|
{
|
||||||
httpserver = "http://" + mreg.ExternalEndPoint.Address.ToString() + ":" + mreg.HttpPort + "/MAP/MapItems/" + regionhandle.ToString();
|
httpserver = mreg.ServerURI + "MAP/MapItems/" + regionhandle.ToString();
|
||||||
lock (m_cachedRegionMapItemsAddress)
|
lock (m_cachedRegionMapItemsAddress)
|
||||||
{
|
{
|
||||||
if (!m_cachedRegionMapItemsAddress.ContainsKey(regionhandle))
|
if (!m_cachedRegionMapItemsAddress.ContainsKey(regionhandle))
|
||||||
|
|
|
@ -63,12 +63,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
|
|
||||||
protected override string AgentPath()
|
protected override string AgentPath()
|
||||||
{
|
{
|
||||||
return "/foreignagent/";
|
return "foreignagent/";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string ObjectPath()
|
protected override string ObjectPath()
|
||||||
{
|
{
|
||||||
return "/foreignobject/";
|
return "foreignobject/";
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string externalName, out string imageURL, out string reason)
|
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
|
||||||
paramList.Add(hash);
|
paramList.Add(hash);
|
||||||
|
|
||||||
XmlRpcRequest request = new XmlRpcRequest("link_region", paramList);
|
XmlRpcRequest request = new XmlRpcRequest("link_region", paramList);
|
||||||
string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/");
|
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + info.ServerURI);
|
||||||
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri);
|
|
||||||
XmlRpcResponse response = null;
|
XmlRpcResponse response = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
response = request.Send(uri, 10000);
|
response = request.Send(info.ServerURI, 10000);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -192,12 +191,11 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
paramList.Add(hash);
|
paramList.Add(hash);
|
||||||
|
|
||||||
XmlRpcRequest request = new XmlRpcRequest("get_region", paramList);
|
XmlRpcRequest request = new XmlRpcRequest("get_region", paramList);
|
||||||
string uri = "http://" + ((gatekeeper.ServerURI != null && gatekeeper.ServerURI != string.Empty && !gatekeeper.ServerURI.StartsWith("http:")) ? gatekeeper.ServerURI : gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/");
|
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + gatekeeper.ServerURI);
|
||||||
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri);
|
|
||||||
XmlRpcResponse response = null;
|
XmlRpcResponse response = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
response = request.Send(uri, 10000);
|
response = request.Send(gatekeeper.ServerURI, 10000);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
|
|
||||||
protected virtual string AgentPath()
|
protected virtual string AgentPath()
|
||||||
{
|
{
|
||||||
return "/agent/";
|
return "agent/";
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason)
|
public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason)
|
||||||
|
@ -106,8 +106,6 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
|
|
||||||
string uri = destination.ServerURI + AgentPath() + aCircuit.AgentID + "/";
|
string uri = destination.ServerURI + AgentPath() + aCircuit.AgentID + "/";
|
||||||
|
|
||||||
//Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
|
|
||||||
|
|
||||||
AgentCreateRequest = (HttpWebRequest)WebRequest.Create(uri);
|
AgentCreateRequest = (HttpWebRequest)WebRequest.Create(uri);
|
||||||
AgentCreateRequest.Method = "POST";
|
AgentCreateRequest.Method = "POST";
|
||||||
AgentCreateRequest.ContentType = "application/json";
|
AgentCreateRequest.ContentType = "application/json";
|
||||||
|
@ -261,7 +259,6 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
{
|
{
|
||||||
// Eventually, we want to use a caps url instead of the agentID
|
// Eventually, we want to use a caps url instead of the agentID
|
||||||
string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";
|
string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";
|
||||||
//Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri);
|
|
||||||
|
|
||||||
HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
|
HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
|
||||||
ChildUpdateRequest.Method = "PUT";
|
ChildUpdateRequest.Method = "PUT";
|
||||||
|
@ -360,7 +357,6 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
agent = null;
|
agent = null;
|
||||||
// Eventually, we want to use a caps url instead of the agentID
|
// Eventually, we want to use a caps url instead of the agentID
|
||||||
string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
|
string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
|
||||||
//Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri);
|
|
||||||
|
|
||||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
|
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
|
||||||
request.Method = "GET";
|
request.Method = "GET";
|
||||||
|
@ -381,7 +377,6 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
sr = new StreamReader(webResponse.GetResponseStream());
|
sr = new StreamReader(webResponse.GetResponseStream());
|
||||||
reply = sr.ReadToEnd().Trim();
|
reply = sr.ReadToEnd().Trim();
|
||||||
|
|
||||||
//Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was " + reply);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
|
@ -402,7 +397,6 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
OSDMap args = Util.GetOSDMap(reply);
|
OSDMap args = Util.GetOSDMap(reply);
|
||||||
if (args == null)
|
if (args == null)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: Error getting OSDMap from reply");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -411,7 +405,6 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: DoRetrieveRootAgentCall returned status " + webResponse.StatusCode);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -455,7 +448,6 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
{
|
{
|
||||||
string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
|
string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
|
||||||
|
|
||||||
//Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri);
|
|
||||||
|
|
||||||
WebRequest request = WebRequest.Create(uri);
|
WebRequest request = WebRequest.Create(uri);
|
||||||
request.Method = "DELETE";
|
request.Method = "DELETE";
|
||||||
|
|
|
@ -479,7 +479,7 @@ namespace OpenSim.Services.GridService
|
||||||
OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]);
|
OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]);
|
||||||
MainConsole.Instance.Output(String.Format("{0,-20} {1}\n{2,-20} {3}\n{4,-39} {5}\n\n",
|
MainConsole.Instance.Output(String.Format("{0,-20} {1}\n{2,-20} {3}\n{4,-39} {5}\n\n",
|
||||||
r.RegionName, r.RegionID,
|
r.RegionName, r.RegionID,
|
||||||
String.Format("{0},{1}", r.posX, r.posY), "http://" + r.Data["serverIP"].ToString() + ":" + r.Data["serverPort"].ToString(),
|
String.Format("{0},{1}", r.posX, r.posY), r.Data["serverURI"],
|
||||||
r.Data["owner_uuid"].ToString(), flags.ToString()));
|
r.Data["owner_uuid"].ToString(), flags.ToString()));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -199,11 +199,14 @@ namespace OpenSim.Services.GridService
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string externalRegionName, string serverURI, out GridRegion regInfo, out string reason)
|
||||||
public bool TryCreateLink(UUID scopeID, int xloc, int yloc,
|
|
||||||
string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason)
|
|
||||||
{
|
{
|
||||||
TryCreateLink(scopeID, xloc, yloc, externalRegionName, externalPort, externalHostName, null, regInfo, reason);
|
return TryCreateLink(scopeID, xloc, yloc, externalRegionName, 0, null, serverURI, out regInfo, out reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason)
|
||||||
|
{
|
||||||
|
return TryCreateLink(scopeID, xloc, yloc, externalRegionName, externalPort, externalHostName, null, out regInfo, out reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
// From the command line and the 2 above
|
// From the command line and the 2 above
|
||||||
|
|
|
@ -333,34 +333,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
|
|
||||||
private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient)
|
private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient)
|
||||||
{
|
{
|
||||||
string capsSeedPath = String.Empty;
|
SeedCapability = destination.ServerURI + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath);
|
||||||
|
|
||||||
// Don't use the following! It Fails for logging into any region not on the same port as the http server!
|
|
||||||
// Kept here so it doesn't happen again!
|
|
||||||
// response.SeedCapability = regionInfo.ServerURI + capsSeedPath;
|
|
||||||
|
|
||||||
#region IP Translation for NAT
|
|
||||||
if (ipepClient != null)
|
|
||||||
{
|
|
||||||
capsSeedPath
|
|
||||||
= "http://"
|
|
||||||
+ NetworkUtil.GetHostFor(ipepClient.Address, destination.ExternalHostName)
|
|
||||||
+ ":"
|
|
||||||
+ destination.HttpPort
|
|
||||||
+ CapsUtil.GetCapsSeedPath(aCircuit.CapsPath);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
capsSeedPath
|
|
||||||
= "http://"
|
|
||||||
+ destination.ExternalHostName
|
|
||||||
+ ":"
|
|
||||||
+ destination.HttpPort
|
|
||||||
+ CapsUtil.GetCapsSeedPath(aCircuit.CapsPath);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
SeedCapability = capsSeedPath;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetDefaultValues()
|
private void SetDefaultValues()
|
||||||
|
|
Loading…
Reference in New Issue