* Start passing around a region server's http port in RegionInfo.

* This means that caps methods (editing scripts, poss map functions, etc) on non-home regions should now work with servers which are listening for http ports on a non default 
(9000) port.  
* If you are running a region server, this may only work properly once your grid server upgrades to this revision
* PLEASE NOTE: This shouldn't cause inter-region problems if one end of the connection hasn't upgraded to this revision.  However if it does, the instability will persist until 
the grid and region (and possibly all the region's neighbours) have upgraded to this revision.
* This revision also adds extra login related messages, both for success and failure conditions
This commit is contained in:
Justin Clarke Casey
2008-03-23 21:21:39 +00:00
parent 68d016517d
commit da531fa9e1
10 changed files with 107 additions and 33 deletions

View File

@@ -349,7 +349,7 @@ namespace OpenSim
m_standaloneAuthenticate);
m_loginService.OnLoginToRegion += backendService.AddNewSession;
// XMLRPC action
// set up XMLRPC handler for client's initial login request message
m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
// provides the web form login

View File

@@ -178,6 +178,10 @@ namespace OpenSim.Region.Communications.Local
_login.StartPos = new LLVector3(128, 128, 70);
_login.CapsPath = capsPath;
m_log.InfoFormat(
"[LOGIN]: Telling region {0} @ {1},{2} ({3}:{4}) to expect user connection",
reg.RegionName, response.RegionX, response.RegionY, response.SimAddress, response.SimPort);
handlerLoginToRegion = OnLoginToRegion;
if (handlerLoginToRegion != null)
{

View File

@@ -228,7 +228,14 @@ namespace OpenSim.Region.Communications.OGS1
string externalIpStr = Util.GetHostFromDNS(simIp).ToString();
SimpleRegionInfo sri = new SimpleRegionInfo(regX, regY, simIp, port);
sri.RemotingPort = Convert.ToUInt32(neighbourData["remoting_port"]);
if (neighbourData.ContainsKey("http_port"))
{
sri.HttpPort = Convert.ToUInt32(neighbourData["http_port"]);
}
sri.RegionID = new LLUUID((string) neighbourData["uuid"]);
neighbours.Add(sri);
@@ -275,6 +282,11 @@ namespace OpenSim.Region.Communications.OGS1
regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
regionInfo.RemotingAddress = internalIpStr;
if (responseData.ContainsKey("http_port"))
{
regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]);
}
regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]);
regionInfo.RegionName = (string) responseData["region_name"];
@@ -333,6 +345,11 @@ namespace OpenSim.Region.Communications.OGS1
regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
regionInfo.RemotingAddress = internalIpStr;
if (responseData.ContainsKey("http_port"))
{
regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]);
}
regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]);
regionInfo.RegionName = (string) responseData["region_name"];
@@ -385,6 +402,11 @@ namespace OpenSim.Region.Communications.OGS1
regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
regionInfo.RemotingAddress = internalIpStr;
if (responseData.ContainsKey("http_port"))
{
regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]);
}
regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]);
regionInfo.RegionName = (string) responseData["region_name"];
@@ -813,8 +835,10 @@ namespace OpenSim.Region.Communications.OGS1
// And, surprisingly, the reason is.. it doesn't know
// it's own remoting port! How special.
region = new SearializableRegionInfo(RequestNeighbourInfo(region.RegionHandle));
region.RemotingAddress = region.ExternalHostName;
region.RemotingPort = NetworkServersInfo.RemotingListenerPort;
region.RemotingAddress = region.ExternalHostName;
region.RemotingPort = NetworkServersInfo.RemotingListenerPort;
region.HttpPort = serversInfo.HttpListenerPort;
if (m_localBackend.RegionUp(region, regionhandle))
{
return true;

View File

@@ -554,7 +554,8 @@ namespace OpenSim.Region.Environment.Scenes
// TODO Should construct this behind a method
string capsPath =
"http://" + reg.ExternalHostName + ":" + 9000 + "/CAPS/" + circuitdata.CapsPath + "0000/";
"http://" + reg.ExternalHostName + ":" + reg.HttpPort
+ "/CAPS/" + circuitdata.CapsPath + "0000/";
avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4),
capsPath);

View File

@@ -1618,9 +1618,9 @@ namespace OpenSim.Region.Environment.Scenes
{
AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo();
// TODO Should construct this behind a method
// TODO Should construct this behind a method
string capsPath =
"http://" + neighbourRegion.ExternalHostName + ":" + 9000
"http://" + neighbourRegion.ExternalHostName + ":" + neighbourRegion.HttpPort
+ "/CAPS/" + circuitdata.CapsPath + "0000/";
m_log.DebugFormat(