diff options
Diffstat (limited to 'OpenSim/Grid/UserServer/Main.cs')
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 4e397aa..464ea77 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Grid.UserServer | |||
50 | { | 50 | { |
51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | private UserConfig Cfg; | 53 | protected UserConfig Cfg; |
54 | 54 | ||
55 | public UserManager m_userManager; | 55 | public UserManager m_userManager; |
56 | public UserLoginService m_loginService; | 56 | public UserLoginService m_loginService; |
@@ -72,13 +72,13 @@ namespace OpenSim.Grid.UserServer | |||
72 | userserver.Work(); | 72 | userserver.Work(); |
73 | } | 73 | } |
74 | 74 | ||
75 | private OpenUser_Main() | 75 | protected OpenUser_Main() |
76 | { | 76 | { |
77 | m_console = new ConsoleBase("User", this); | 77 | m_console = new ConsoleBase("User", this); |
78 | MainConsole.Instance = m_console; | 78 | MainConsole.Instance = m_console; |
79 | } | 79 | } |
80 | 80 | ||
81 | private void Work() | 81 | public void Work() |
82 | { | 82 | { |
83 | m_console.Notice("Enter help for a list of commands\n"); | 83 | m_console.Notice("Enter help for a list of commands\n"); |
84 | 84 | ||
@@ -95,15 +95,16 @@ namespace OpenSim.Grid.UserServer | |||
95 | m_stats = StatsManager.StartCollectingUserStats(); | 95 | m_stats = StatsManager.StartCollectingUserStats(); |
96 | 96 | ||
97 | m_log.Info("[REGION]: Establishing data connection"); | 97 | m_log.Info("[REGION]: Establishing data connection"); |
98 | m_userManager = new UserManager(); | 98 | |
99 | StartupUserManager(); | ||
100 | |||
99 | m_userManager.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect); | 101 | m_userManager.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect); |
100 | 102 | ||
101 | m_gridInfoService = new GridInfoService(); | 103 | m_gridInfoService = new GridInfoService(); |
102 | 104 | ||
103 | m_interServiceInventoryService = new OGS1InterServiceInventoryService(Cfg.InventoryUrl); | 105 | m_interServiceInventoryService = new OGS1InterServiceInventoryService(Cfg.InventoryUrl); |
104 | 106 | ||
105 | m_loginService = new UserLoginService( | 107 | StartupLoginService(); |
106 | m_userManager, m_interServiceInventoryService, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); | ||
107 | 108 | ||
108 | m_messagesService = new MessageServersConnector(); | 109 | m_messagesService = new MessageServersConnector(); |
109 | 110 | ||
@@ -122,6 +123,17 @@ namespace OpenSim.Grid.UserServer | |||
122 | m_httpServer.Start(); | 123 | m_httpServer.Start(); |
123 | } | 124 | } |
124 | 125 | ||
126 | protected virtual void StartupUserManager() | ||
127 | { | ||
128 | m_userManager = new UserManager(); | ||
129 | } | ||
130 | |||
131 | protected virtual void StartupLoginService() | ||
132 | { | ||
133 | m_loginService = new UserLoginService( | ||
134 | m_userManager, m_interServiceInventoryService, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); | ||
135 | } | ||
136 | |||
125 | protected void AddHttpHandlers() | 137 | protected void AddHttpHandlers() |
126 | { | 138 | { |
127 | m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); | 139 | m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); |