From 1a28ef6292a152a69d0f53803daacc7dad522cea Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 11 Apr 2007 20:07:58 +0000 Subject: * Replaced GridHTTPServer and UserHTTPServer with BaseHttpServer * Now dumping default value in config. * --- OpenSim.RegionServer/OpenSimMain.cs | 16 ++++++++-------- OpenSim.RegionServer/RegionInfo.cs | 16 ++++++++-------- OpenSim.RegionServer/world/Avatar.cs | 2 +- OpenSim.RegionServer/world/Primitive2.cs | 1 - 4 files changed, 17 insertions(+), 18 deletions(-) (limited to 'OpenSim.RegionServer') diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index 9ea32b1..8c93128 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs @@ -60,7 +60,6 @@ namespace OpenSim //private IGenericConfig remoteConfig; private PhysicsManager physManager; private Grid GridServers; - private BaseHttpServer _httpServer; private PacketServer _packetServer; private World LocalWorld; private AssetCache AssetCache; @@ -175,12 +174,13 @@ namespace OpenSim m_console.WriteLine("Main.cs:Startup() - Initialising HTTP server"); // HttpServer = new SimCAPSHTTPServer(GridServers.GridServer, Cfg.IPListenPort); - _httpServer = new BaseHttpServer(regionData.IPListenPort); + + BaseHttpServer httpServer = new BaseHttpServer( regionData.IPListenPort ); if (gridServer.GetName() == "Remote") { //we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server - _httpServer.AddXmlRPCHandler("expect_user", + httpServer.AddXmlRPCHandler("expect_user", delegate(XmlRpcRequest request) { Hashtable requestData = (Hashtable)request.Params[0]; @@ -196,7 +196,7 @@ namespace OpenSim return new XmlRpcResponse(); }); - _httpServer.AddRestHandler("GET", "/simstatus/", + httpServer.AddRestHandler("GET", "/simstatus/", delegate(string request, string path, string param ) { return "OK"; @@ -218,20 +218,20 @@ namespace OpenSim this.GridServers.UserServer = loginServer; adminLoginServer = loginServer; - _httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.LocalUserManager.XmlRpcLoginMethod); + httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.LocalUserManager.XmlRpcLoginMethod); } else { //sandbox mode with loginserver not using accounts - _httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod); + httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod); } } AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer); - adminWebFront.LoadMethods(_httpServer); + adminWebFront.LoadMethods(httpServer); m_console.WriteLine("Main.cs:Startup() - Starting HTTP server"); - _httpServer.Start(); + httpServer.Start(); MainServerListener(); diff --git a/OpenSim.RegionServer/RegionInfo.cs b/OpenSim.RegionServer/RegionInfo.cs index 83c69ff..1256b50 100644 --- a/OpenSim.RegionServer/RegionInfo.cs +++ b/OpenSim.RegionServer/RegionInfo.cs @@ -94,7 +94,7 @@ namespace OpenSim attri = configData.GetAttribute("SimName"); if (attri == "") { - this.RegionName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Name [OpenSim test]: ", "OpenSim test"); + this.RegionName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Name", "OpenSim test"); configData.SetAttribute("SimName", this.RegionName); } else @@ -106,7 +106,7 @@ namespace OpenSim attri = configData.GetAttribute("SimLocationX"); if (attri == "") { - string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location X [997]: ", "997"); + string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location X", "997"); configData.SetAttribute("SimLocationX", location); this.RegionLocX = (uint)Convert.ToUInt32(location); } @@ -119,7 +119,7 @@ namespace OpenSim attri = configData.GetAttribute("SimLocationY"); if (attri == "") { - string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location Y [996]: ", "996"); + string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location Y", "996"); configData.SetAttribute("SimLocationY", location); this.RegionLocY = (uint)Convert.ToUInt32(location); } @@ -132,7 +132,7 @@ namespace OpenSim attri = configData.GetAttribute("SimListenPort"); if (attri == "") { - string port = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("UDP port for client connections [9000]: ", "9000"); + string port = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("UDP port for client connections", "9000"); configData.SetAttribute("SimListenPort", port); this.IPListenPort = Convert.ToInt32(port); } @@ -145,7 +145,7 @@ namespace OpenSim attri = configData.GetAttribute("SimListenAddress"); if (attri == "") { - this.IPListenAddr = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("IP Address to listen on for client connections [127.0.0.1]: ", "127.0.0.1"); + this.IPListenAddr = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("IP Address to listen on for client connections", "127.0.0.1"); configData.SetAttribute("SimListenAddress", this.IPListenAddr); } else @@ -162,7 +162,7 @@ namespace OpenSim attri = configData.GetAttribute("GridServerURL"); if (attri == "") { - this.GridURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL: "); + this.GridURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL"); configData.SetAttribute("GridServerURL", this.GridURL); } else @@ -175,7 +175,7 @@ namespace OpenSim attri = configData.GetAttribute("GridSendKey"); if (attri == "") { - this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server: "); + this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server"); configData.SetAttribute("GridSendKey", this.GridSendKey); } else @@ -188,7 +188,7 @@ namespace OpenSim attri = configData.GetAttribute("GridRecvKey"); if (attri == "") { - this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from grid server: "); + this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from grid server"); configData.SetAttribute("GridRecvKey", this.GridRecvKey); } else diff --git a/OpenSim.RegionServer/world/Avatar.cs b/OpenSim.RegionServer/world/Avatar.cs index 843c3af..42a2067 100644 --- a/OpenSim.RegionServer/world/Avatar.cs +++ b/OpenSim.RegionServer/world/Avatar.cs @@ -32,7 +32,7 @@ namespace OpenSim.world private ulong m_regionHandle; private Dictionary m_clientThreads; private string m_regionName; - private bool childShadowAvatar = false; + //private bool childShadowAvatar = false; public Avatar(SimClient TheClient, World world, string regionName, Dictionary clientThreads, ulong regionHandle) { diff --git a/OpenSim.RegionServer/world/Primitive2.cs b/OpenSim.RegionServer/world/Primitive2.cs index 4b26fbe..616dc25 100644 --- a/OpenSim.RegionServer/world/Primitive2.cs +++ b/OpenSim.RegionServer/world/Primitive2.cs @@ -22,7 +22,6 @@ namespace OpenSim.world private bool physicsEnabled = false; private Dictionary inventoryItems; - private string inventoryFileName = ""; #region Properties -- cgit v1.1