* Replaced GridHTTPServer and UserHTTPServer with BaseHttpServer

* Now dumping default value in config.
*
This commit is contained in:
lbsa71
2007-04-11 20:07:58 +00:00
parent cb88393f6b
commit 1a28ef6292
24 changed files with 530 additions and 761 deletions

View File

@@ -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();

View File

@@ -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

View File

@@ -32,7 +32,7 @@ namespace OpenSim.world
private ulong m_regionHandle;
private Dictionary<uint, SimClient> m_clientThreads;
private string m_regionName;
private bool childShadowAvatar = false;
//private bool childShadowAvatar = false;
public Avatar(SimClient TheClient, World world, string regionName, Dictionary<uint, SimClient> clientThreads, ulong regionHandle)
{

View File

@@ -22,7 +22,6 @@ namespace OpenSim.world
private bool physicsEnabled = false;
private Dictionary<LLUUID, InventoryItem> inventoryItems;
private string inventoryFileName = "";
#region Properties