aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-03-23 21:21:39 +0000
committerJustin Clarke Casey2008-03-23 21:21:39 +0000
commitda531fa9e124394228a7c7597bd50e548af81efb (patch)
treef522f4f115b8bf5db07b45ddcc1c60261dcde680 /OpenSim/Region
parentImplements llGetParcelPrimOwners() (diff)
downloadopensim-SC_OLD-da531fa9e124394228a7c7597bd50e548af81efb.zip
opensim-SC_OLD-da531fa9e124394228a7c7597bd50e548af81efb.tar.gz
opensim-SC_OLD-da531fa9e124394228a7c7597bd50e548af81efb.tar.bz2
opensim-SC_OLD-da531fa9e124394228a7c7597bd50e548af81efb.tar.xz
* 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
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs2
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs4
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs28
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs4
5 files changed, 35 insertions, 6 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index f96d474..aa5a432 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -349,7 +349,7 @@ namespace OpenSim
349 m_standaloneAuthenticate); 349 m_standaloneAuthenticate);
350 m_loginService.OnLoginToRegion += backendService.AddNewSession; 350 m_loginService.OnLoginToRegion += backendService.AddNewSession;
351 351
352 // XMLRPC action 352 // set up XMLRPC handler for client's initial login request message
353 m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); 353 m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
354 354
355 // provides the web form login 355 // provides the web form login
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 9f47239..3eac7e9 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -178,6 +178,10 @@ namespace OpenSim.Region.Communications.Local
178 _login.StartPos = new LLVector3(128, 128, 70); 178 _login.StartPos = new LLVector3(128, 128, 70);
179 _login.CapsPath = capsPath; 179 _login.CapsPath = capsPath;
180 180
181 m_log.InfoFormat(
182 "[LOGIN]: Telling region {0} @ {1},{2} ({3}:{4}) to expect user connection",
183 reg.RegionName, response.RegionX, response.RegionY, response.SimAddress, response.SimPort);
184
181 handlerLoginToRegion = OnLoginToRegion; 185 handlerLoginToRegion = OnLoginToRegion;
182 if (handlerLoginToRegion != null) 186 if (handlerLoginToRegion != null)
183 { 187 {
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index fa1db15..23b8fb4 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -228,7 +228,14 @@ namespace OpenSim.Region.Communications.OGS1
228 228
229 string externalIpStr = Util.GetHostFromDNS(simIp).ToString(); 229 string externalIpStr = Util.GetHostFromDNS(simIp).ToString();
230 SimpleRegionInfo sri = new SimpleRegionInfo(regX, regY, simIp, port); 230 SimpleRegionInfo sri = new SimpleRegionInfo(regX, regY, simIp, port);
231
231 sri.RemotingPort = Convert.ToUInt32(neighbourData["remoting_port"]); 232 sri.RemotingPort = Convert.ToUInt32(neighbourData["remoting_port"]);
233
234 if (neighbourData.ContainsKey("http_port"))
235 {
236 sri.HttpPort = Convert.ToUInt32(neighbourData["http_port"]);
237 }
238
232 sri.RegionID = new LLUUID((string) neighbourData["uuid"]); 239 sri.RegionID = new LLUUID((string) neighbourData["uuid"]);
233 240
234 neighbours.Add(sri); 241 neighbours.Add(sri);
@@ -275,6 +282,11 @@ namespace OpenSim.Region.Communications.OGS1
275 282
276 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); 283 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
277 regionInfo.RemotingAddress = internalIpStr; 284 regionInfo.RemotingAddress = internalIpStr;
285
286 if (responseData.ContainsKey("http_port"))
287 {
288 regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]);
289 }
278 290
279 regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); 291 regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]);
280 regionInfo.RegionName = (string) responseData["region_name"]; 292 regionInfo.RegionName = (string) responseData["region_name"];
@@ -333,6 +345,11 @@ namespace OpenSim.Region.Communications.OGS1
333 345
334 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); 346 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
335 regionInfo.RemotingAddress = internalIpStr; 347 regionInfo.RemotingAddress = internalIpStr;
348
349 if (responseData.ContainsKey("http_port"))
350 {
351 regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]);
352 }
336 353
337 regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); 354 regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]);
338 regionInfo.RegionName = (string) responseData["region_name"]; 355 regionInfo.RegionName = (string) responseData["region_name"];
@@ -385,6 +402,11 @@ namespace OpenSim.Region.Communications.OGS1
385 402
386 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); 403 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
387 regionInfo.RemotingAddress = internalIpStr; 404 regionInfo.RemotingAddress = internalIpStr;
405
406 if (responseData.ContainsKey("http_port"))
407 {
408 regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]);
409 }
388 410
389 regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); 411 regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]);
390 regionInfo.RegionName = (string) responseData["region_name"]; 412 regionInfo.RegionName = (string) responseData["region_name"];
@@ -813,8 +835,10 @@ namespace OpenSim.Region.Communications.OGS1
813 // And, surprisingly, the reason is.. it doesn't know 835 // And, surprisingly, the reason is.. it doesn't know
814 // it's own remoting port! How special. 836 // it's own remoting port! How special.
815 region = new SearializableRegionInfo(RequestNeighbourInfo(region.RegionHandle)); 837 region = new SearializableRegionInfo(RequestNeighbourInfo(region.RegionHandle));
816 region.RemotingAddress = region.ExternalHostName; 838 region.RemotingAddress = region.ExternalHostName;
817 region.RemotingPort = NetworkServersInfo.RemotingListenerPort; 839 region.RemotingPort = NetworkServersInfo.RemotingListenerPort;
840 region.HttpPort = serversInfo.HttpListenerPort;
841
818 if (m_localBackend.RegionUp(region, regionhandle)) 842 if (m_localBackend.RegionUp(region, regionhandle))
819 { 843 {
820 return true; 844 return true;
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 5dccf13..f2b2f20 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -554,7 +554,8 @@ namespace OpenSim.Region.Environment.Scenes
554 554
555 // TODO Should construct this behind a method 555 // TODO Should construct this behind a method
556 string capsPath = 556 string capsPath =
557 "http://" + reg.ExternalHostName + ":" + 9000 + "/CAPS/" + circuitdata.CapsPath + "0000/"; 557 "http://" + reg.ExternalHostName + ":" + reg.HttpPort
558 + "/CAPS/" + circuitdata.CapsPath + "0000/";
558 559
559 avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), 560 avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4),
560 capsPath); 561 capsPath);
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index f58109d..def7a77 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1618,9 +1618,9 @@ namespace OpenSim.Region.Environment.Scenes
1618 { 1618 {
1619 AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo(); 1619 AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo();
1620 1620
1621 // TODO Should construct this behind a method 1621 // TODO Should construct this behind a method
1622 string capsPath = 1622 string capsPath =
1623 "http://" + neighbourRegion.ExternalHostName + ":" + 9000 1623 "http://" + neighbourRegion.ExternalHostName + ":" + neighbourRegion.HttpPort
1624 + "/CAPS/" + circuitdata.CapsPath + "0000/"; 1624 + "/CAPS/" + circuitdata.CapsPath + "0000/";
1625 1625
1626 m_log.DebugFormat( 1626 m_log.DebugFormat(