diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 46b28d73b0..2a66260d48 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -119,7 +119,7 @@ namespace OpenSim.Framework.Communications } // see IUserService - public UserProfileData GetUserProfile(UUID uuid) + public virtual UserProfileData GetUserProfile(UUID uuid) { foreach (IUserDataPlugin plugin in _plugins) { diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 4e397aa9ce..464ea77950 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -50,7 +50,7 @@ namespace OpenSim.Grid.UserServer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private UserConfig Cfg; + protected UserConfig Cfg; public UserManager m_userManager; public UserLoginService m_loginService; @@ -72,13 +72,13 @@ namespace OpenSim.Grid.UserServer userserver.Work(); } - private OpenUser_Main() + protected OpenUser_Main() { m_console = new ConsoleBase("User", this); MainConsole.Instance = m_console; } - private void Work() + public void Work() { m_console.Notice("Enter help for a list of commands\n"); @@ -95,15 +95,16 @@ namespace OpenSim.Grid.UserServer m_stats = StatsManager.StartCollectingUserStats(); m_log.Info("[REGION]: Establishing data connection"); - m_userManager = new UserManager(); + + StartupUserManager(); + m_userManager.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect); m_gridInfoService = new GridInfoService(); m_interServiceInventoryService = new OGS1InterServiceInventoryService(Cfg.InventoryUrl); - m_loginService = new UserLoginService( - m_userManager, m_interServiceInventoryService, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); + StartupLoginService(); m_messagesService = new MessageServersConnector(); @@ -122,6 +123,17 @@ namespace OpenSim.Grid.UserServer m_httpServer.Start(); } + protected virtual void StartupUserManager() + { + m_userManager = new UserManager(); + } + + protected virtual void StartupLoginService() + { + m_loginService = new UserLoginService( + m_userManager, m_interServiceInventoryService, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); + } + protected void AddHttpHandlers() { m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 1a697600ec..82d5af5b47 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -46,7 +46,7 @@ namespace OpenSim.Grid.UserServer public class UserLoginService : LoginService { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected IInterServiceInventoryServices m_inventoryService; diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index f8f9f398e3..76f83b76d4 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -42,7 +42,7 @@ namespace OpenSim.Grid.UserServer public class UserManager : UserManagerBase { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public event logOffUser OnLogOffUser; private logOffUser handlerLogOffUser;