From 5eacce71ad6513bf28dbe239ec7fd9802c3279eb Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 4 May 2007 07:43:07 +0000 Subject: * Removed superfluous int to prevent warning * Changed OGSServer on RegionServer to bind to - 500 rather than a single fixed port * Added support for the grid server to tell us who we are (optional) --- OpenSim.RegionServer/OpenSimMain.cs | 12 +++++++++++- OpenSim.RegionServer/world/Avatar.cs | 1 - 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'OpenSim.RegionServer') diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index 836f57f..61441b2 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs @@ -184,6 +184,16 @@ namespace OpenSim { this.LocalWorld.m_datastore = ((string)((RemoteGridBase)GridServers.GridServer).GridData["data_uri"]); } + + if (((RemoteGridBase)(GridServers.GridServer)).GridData["regionname"].ToString() != "") + { + // The grid server has told us who we are + // We must obey the grid server. + regionData.RegionLocX = Convert.ToUInt32(((RemoteGridBase)(GridServers.GridServer)).GridData["region_locx"].ToString()); + regionData.RegionLocY = Convert.ToUInt32(((RemoteGridBase)(GridServers.GridServer)).GridData["region_locy"].ToString()); + regionData.RegionName = ((RemoteGridBase)(GridServers.GridServer)).GridData["regionname"].ToString(); + } + } @@ -224,7 +234,7 @@ namespace OpenSim if (gridServer.GetName() == "Remote") { // should startup the OGS protocol server here - OGSServer = new OpenGridProtocolServer(8500); + OGSServer = new OpenGridProtocolServer(this.regionData.IPListenPort - 500); // Changed so we can have more than one OGSServer per machine. // we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server httpServer.AddXmlRPCHandler("expect_user", diff --git a/OpenSim.RegionServer/world/Avatar.cs b/OpenSim.RegionServer/world/Avatar.cs index 97ed78d..7f5fd12 100644 --- a/OpenSim.RegionServer/world/Avatar.cs +++ b/OpenSim.RegionServer/world/Avatar.cs @@ -102,7 +102,6 @@ namespace OpenSim.world public static void SetupTemplate(string name) { - int i = 0; FileInfo fInfo = new FileInfo(name); long numBytes = fInfo.Length; FileStream fStream = new FileStream(name, FileMode.Open, FileAccess.Read); -- cgit v1.1