aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserServerCommandModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/UserServer/UserServerCommandModule.cs')
-rw-r--r--OpenSim/Grid/UserServer/UserServerCommandModule.cs27
1 files changed, 21 insertions, 6 deletions
diff --git a/OpenSim/Grid/UserServer/UserServerCommandModule.cs b/OpenSim/Grid/UserServer/UserServerCommandModule.cs
index d923c9a..41a7eed 100644
--- a/OpenSim/Grid/UserServer/UserServerCommandModule.cs
+++ b/OpenSim/Grid/UserServer/UserServerCommandModule.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Grid.UserServer
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 protected ConsoleBase m_console; 52 protected ConsoleBase m_console;
53 protected UserConfig Cfg; 53 protected UserConfig m_cfg;
54 54
55 protected UserDataBaseService m_userDataBaseService; 55 protected UserDataBaseService m_userDataBaseService;
56 protected UserLoginService m_loginService; 56 protected UserLoginService m_loginService;
@@ -59,10 +59,8 @@ namespace OpenSim.Grid.UserServer
59 59
60 protected IUGAIMCore m_core; 60 protected IUGAIMCore m_core;
61 61
62 public UserServerCommandModule(UserConfig cfg, UserDataBaseService userDBservice, UserLoginService loginService) 62 public UserServerCommandModule( UserLoginService loginService)
63 { 63 {
64 Cfg = cfg;
65 m_userDataBaseService = userDBservice;
66 m_loginService = loginService; 64 m_loginService = loginService;
67 } 65 }
68 66
@@ -73,6 +71,23 @@ namespace OpenSim.Grid.UserServer
73 71
74 public void PostInitialise() 72 public void PostInitialise()
75 { 73 {
74 UserConfig cfg;
75 if (m_core.TryGet<UserConfig>(out cfg))
76 {
77 m_cfg = cfg;
78 }
79
80 UserDataBaseService userDBservice;
81 if (m_core.TryGet<UserDataBaseService>(out userDBservice))
82 {
83 m_userDataBaseService = userDBservice;
84 }
85
86 ConsoleBase console;
87 if ((m_core.TryGet<ConsoleBase>(out console)) && (m_cfg != null) && (m_userDataBaseService != null))
88 {
89 RegisterConsoleCommands(console);
90 }
76 } 91 }
77 92
78 public void RegisterHandlers(BaseHttpServer httpServer) 93 public void RegisterHandlers(BaseHttpServer httpServer)
@@ -80,7 +95,7 @@ namespace OpenSim.Grid.UserServer
80 95
81 } 96 }
82 97
83 public void RegisterConsoleCommands(ConsoleBase console) 98 private void RegisterConsoleCommands(ConsoleBase console)
84 { 99 {
85 m_console = console; 100 m_console = console;
86 m_console.Commands.AddCommand("userserver", false, "create user", 101 m_console.Commands.AddCommand("userserver", false, "create user",
@@ -279,7 +294,7 @@ namespace OpenSim.Grid.UserServer
279 // requester.ReturnResponseVal = TestResponse; 294 // requester.ReturnResponseVal = TestResponse;
280 // requester.BeginPostObject<UUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser); 295 // requester.BeginPostObject<UUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser);
281 SynchronousRestObjectPoster.BeginPostObject<UUID, List<InventoryFolderBase>>( 296 SynchronousRestObjectPoster.BeginPostObject<UUID, List<InventoryFolderBase>>(
282 "POST", Cfg.InventoryUrl + "RootFolders/", m_lastCreatedUser); 297 "POST", m_cfg.InventoryUrl + "RootFolders/", m_lastCreatedUser);
283 break; 298 break;
284 299
285 case "logoff-user": 300 case "logoff-user":