From e06ffb3981d29ddb3383690b4a05dc684813b6d9 Mon Sep 17 00:00:00 2001 From: mingchen Date: Tue, 3 Jul 2007 17:03:14 +0000 Subject: *Removed GridInfo class as it has been previously replaced with the much better NetworkServersInfo class *Got the GridServer in OGS1 to go through with registering the region, but the actual storage of the region isnt working right now. **After this is fixed, grid mode should work! --- OpenSim/Grid/GridServer/GridManager.cs | 21 +++++++++++++++++---- OpenSim/Grid/GridServer/Main.cs | 13 +++++++------ OpenSim/Grid/UserServer.Config/DbUserConfig.cs | 2 +- 3 files changed, 25 insertions(+), 11 deletions(-) (limited to 'OpenSim/Grid') diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 824a39e..816c9fd 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs @@ -217,7 +217,6 @@ namespace OpenSim.Grid.GridServer /// Startup parameters public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request) { - Console.WriteLine("XMLRPC SIMULATOR LOGIN METHOD CALLED"); XmlRpcResponse response = new XmlRpcResponse(); Hashtable responseData = new Hashtable(); @@ -229,7 +228,6 @@ namespace OpenSim.Grid.GridServer Console.WriteLine(requestData.ToString()); if (requestData.ContainsKey("UUID")) { - Console.WriteLine("...VIA UUID"); TheSim = getRegion(new LLUUID((string)requestData["UUID"])); logToDB((new LLUUID((string)requestData["UUID"])).ToStringHyphenated(),"XmlRpcSimulatorLoginMethod","", 5,"Region attempting login with UUID."); } @@ -248,7 +246,6 @@ namespace OpenSim.Grid.GridServer if (TheSim == null) { //NEW REGION - Console.WriteLine("THIS IS A NEW REGION...ADDING"); TheSim = new SimProfileData(); TheSim.regionRecvKey = config.SimRecvKey; @@ -277,7 +274,23 @@ namespace OpenSim.Grid.GridServer { try { - Console.WriteLine("ADDED");kvp.Value.AddProfile(TheSim); + DataResponse insertResponse = kvp.Value.AddProfile(TheSim); + switch(insertResponse) + { + case DataResponse.RESPONSE_OK: + Console.WriteLine("New sim creation successful: " + TheSim.regionName); + break; + case DataResponse.RESPONSE_ERROR: + Console.WriteLine("New sim creation failed (Error): " + TheSim.regionName); + break; + case DataResponse.RESPONSE_INVALIDCREDENTIALS: + Console.WriteLine("New sim creation failed (Invalid Credentials): " + TheSim.regionName); + break; + case DataResponse.RESPONSE_AUTHREQUIRED: + Console.WriteLine("New sim creation failed (Authentication Required): " + TheSim.regionName); + break; + } + } catch (Exception) { diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs index 509549e..404c252 100644 --- a/OpenSim/Grid/GridServer/Main.cs +++ b/OpenSim/Grid/GridServer/Main.cs @@ -76,10 +76,11 @@ namespace OpenSim.Grid.GridServer private void Work() { + m_console.Notice("Enter help for a list of commands\n"); + while (true) { - Thread.Sleep(5000); - // should flush the DB etc here + m_console.MainLogPrompt(); } } @@ -120,7 +121,7 @@ namespace OpenSim.Grid.GridServer m_gridManager.config = Cfg; m_console.Verbose( "Main.cs:Startup() - Starting HTTP process"); - BaseHttpServer httpServer = new BaseHttpServer(8001); + BaseHttpServer httpServer = new BaseHttpServer(13801); //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback); httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcSimulatorLoginMethod); @@ -142,9 +143,9 @@ namespace OpenSim.Grid.GridServer //break; // lbsa71 : I guess these were never used? - //Listener.Prefixes.Add("http://+:8001/gods/"); - //Listener.Prefixes.Add("http://+:8001/highestuuid/"); - //Listener.Prefixes.Add("http://+:8001/uuidblocks/"); + //Listener.Prefixes.Add("http://+:13801/gods/"); + //Listener.Prefixes.Add("http://+:13801/highestuuid/"); + //Listener.Prefixes.Add("http://+:13801/uuidblocks/"); httpServer.Start(); diff --git a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs index c7f8255..f57ac52 100644 --- a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs +++ b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs @@ -50,7 +50,7 @@ namespace OpenUser.Config.UserConfigDb4o this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); - this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/"); + this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:13801/"); this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null"); this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); } -- cgit v1.1