From 8143c597fc5f62ec0d931d2d5b887730e06aec04 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 27 Sep 2007 13:25:45 +0000 Subject: * Tleiades grid mode inventory (#444) - thanx Tleiades! * updated to rev 1413 on libsecondlife.dll and libsecondlife.dll.config (#423) --- OpenSim/Grid/UserServer/Main.cs | 11 +++++++- OpenSim/Grid/UserServer/UserLoginService.cs | 39 ++++++++++++++++------------- 2 files changed, 32 insertions(+), 18 deletions(-) (limited to 'OpenSim/Grid/UserServer') diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index c2822b6..28635dd 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -36,6 +36,8 @@ using OpenSim.Framework.Interfaces; using OpenSim.Framework.Servers; using OpenSim.Framework.Utilities; using OpenSim.Framework.Configuration; +using OpenSim.Framework.Communications; +using OpenSim.Region.Communications.OGS1; namespace OpenSim.Grid.UserServer { @@ -48,6 +50,8 @@ namespace OpenSim.Grid.UserServer public UserManager m_userManager; public UserLoginService m_loginService; + public IInventoryServices m_inventoryService; + LogBase m_console; [STAThread] @@ -90,7 +94,11 @@ namespace OpenSim.Grid.UserServer m_userManager._config = Cfg; m_userManager.AddPlugin(Cfg.DatabaseProvider); - m_loginService = new UserLoginService(m_userManager, Cfg, Cfg.DefaultStartupMsg); + // prepare connection to the inventory server + m_inventoryService = new OGS1InventoryService(Cfg.InventoryServerName, Cfg.InventoryServerPort, null); + + + m_loginService = new UserLoginService(m_userManager, m_inventoryService, Cfg, Cfg.DefaultStartupMsg); MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process"); BaseHttpServer httpServer = new BaseHttpServer((int)Cfg.HttpPort); @@ -103,6 +111,7 @@ namespace OpenSim.Grid.UserServer httpServer.AddStreamHandler( new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod )); httpServer.Start(); + m_console.Status("SERVER", "Userserver 0.3 - Startup complete"); } diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 95192e3..f0140a5 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -6,6 +6,7 @@ using OpenSim.Framework.Data; using OpenSim.Framework.UserManagement; using OpenSim.Framework.Utilities; using OpenSim.Framework.Configuration; +using OpenSim.Framework.Communications; namespace OpenSim.Grid.UserServer { @@ -13,8 +14,8 @@ namespace OpenSim.Grid.UserServer { public UserConfig m_config; - public UserLoginService(UserManagerBase userManager, UserConfig config, string welcomeMess) - : base(userManager, welcomeMess) + public UserLoginService(UserManagerBase userManager, IInventoryServices inventoryServer, UserConfig config, string welcomeMess) + : base(userManager, inventoryServer, welcomeMess) { m_config = config; } @@ -71,25 +72,29 @@ namespace OpenSim.Grid.UserServer theUser.currentAgent.currentHandle = SimInfo.regionHandle; System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI); - // Send - try - { - XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); - XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); + // Send + try + { + XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); + XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); } catch( WebException e ) - { - switch( e.Status ) - { - case WebExceptionStatus.Timeout: - //TODO: Send him to nearby or default region instead - break; - - default: - throw; - } + { + switch( e.Status ) + { + case WebExceptionStatus.Timeout: + //TODO: Send him to nearby or default region instead + break; + + default: + throw; + } } } } } + + + + -- cgit v1.1