diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 21 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 18 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 2 |
3 files changed, 19 insertions, 22 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 9b74dbc..9a3e431 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -90,7 +90,7 @@ namespace OpenSim.Grid.UserServer | |||
90 | public override void Startup() | 90 | public override void Startup() |
91 | { | 91 | { |
92 | base.Startup(); | 92 | base.Startup(); |
93 | 93 | ||
94 | Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); | 94 | Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); |
95 | 95 | ||
96 | m_stats = StatsManager.StartCollectingUserStats(); | 96 | m_stats = StatsManager.StartCollectingUserStats(); |
@@ -101,11 +101,11 @@ namespace OpenSim.Grid.UserServer | |||
101 | 101 | ||
102 | m_gridInfoService = new GridInfoService(); | 102 | m_gridInfoService = new GridInfoService(); |
103 | 103 | ||
104 | m_interServiceInventoryService = new OGS1InterServiceInventoryService(Cfg.InventoryUrl); | 104 | m_interServiceInventoryService = new OGS1InterServiceInventoryService(Cfg.InventoryUrl); |
105 | 105 | ||
106 | m_loginService = new UserLoginService( | 106 | m_loginService = new UserLoginService( |
107 | m_userManager, m_interServiceInventoryService, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); | 107 | m_userManager, m_interServiceInventoryService, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); |
108 | 108 | ||
109 | m_messagesService = new MessageServersConnector(); | 109 | m_messagesService = new MessageServersConnector(); |
110 | 110 | ||
111 | m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; | 111 | m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; |
@@ -151,7 +151,6 @@ namespace OpenSim.Grid.UserServer | |||
151 | 151 | ||
152 | m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod)); | 152 | m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod)); |
153 | m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod); | 153 | m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod); |
154 | |||
155 | 154 | ||
156 | m_httpServer.AddStreamHandler( | 155 | m_httpServer.AddStreamHandler( |
157 | new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); | 156 | new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); |
@@ -188,7 +187,7 @@ namespace OpenSim.Grid.UserServer | |||
188 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); | 187 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); |
189 | 188 | ||
190 | LLUUID userID = new LLUUID(); | 189 | LLUUID userID = new LLUUID(); |
191 | 190 | ||
192 | try | 191 | try |
193 | { | 192 | { |
194 | userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | 193 | userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); |
@@ -199,7 +198,7 @@ namespace OpenSim.Grid.UserServer | |||
199 | } | 198 | } |
200 | 199 | ||
201 | try | 200 | try |
202 | { | 201 | { |
203 | if (!m_interServiceInventoryService.CreateNewUserInventory(userID)) | 202 | if (!m_interServiceInventoryService.CreateNewUserInventory(userID)) |
204 | { | 203 | { |
205 | throw new Exception( | 204 | throw new Exception( |
@@ -245,9 +244,9 @@ namespace OpenSim.Grid.UserServer | |||
245 | // requester.ReturnResponseVal = TestResponse; | 244 | // requester.ReturnResponseVal = TestResponse; |
246 | // requester.BeginPostObject<LLUUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser); | 245 | // requester.BeginPostObject<LLUUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser); |
247 | SynchronousRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>( | 246 | SynchronousRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>( |
248 | "POST", Cfg.InventoryUrl + "RootFolders/", m_lastCreatedUser); | 247 | "POST", Cfg.InventoryUrl + "RootFolders/", m_lastCreatedUser); |
249 | break; | 248 | break; |
250 | 249 | ||
251 | case "logoff-user": | 250 | case "logoff-user": |
252 | 251 | ||
253 | if (cmdparams.Length >= 3) | 252 | if (cmdparams.Length >= 3) |
@@ -279,7 +278,7 @@ namespace OpenSim.Grid.UserServer | |||
279 | m_loginService.LogOffUser(theUser, message); | 278 | m_loginService.LogOffUser(theUser, message); |
280 | 279 | ||
281 | theUser.CurrentAgent.AgentOnline = false; | 280 | theUser.CurrentAgent.AgentOnline = false; |
282 | 281 | ||
283 | m_loginService.CommitAgent(ref theUser); | 282 | m_loginService.CommitAgent(ref theUser); |
284 | } | 283 | } |
285 | else | 284 | else |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 0e61b3c..8488e22 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Grid.UserServer | |||
46 | public class UserLoginService : LoginService | 46 | public class UserLoginService : LoginService |
47 | { | 47 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
50 | protected IInterServiceInventoryServices m_inventoryService; | 50 | protected IInterServiceInventoryServices m_inventoryService; |
51 | 51 | ||
52 | public event UserLoggedInAtLocation OnUserLoggedInAtLocation; | 52 | public event UserLoggedInAtLocation OnUserLoggedInAtLocation; |
@@ -63,7 +63,7 @@ namespace OpenSim.Grid.UserServer | |||
63 | m_config = config; | 63 | m_config = config; |
64 | m_inventoryService = inventoryService; | 64 | m_inventoryService = inventoryService; |
65 | } | 65 | } |
66 | 66 | ||
67 | public override void LogOffUser(UserProfileData theUser, string message) | 67 | public override void LogOffUser(UserProfileData theUser, string message) |
68 | { | 68 | { |
69 | RegionProfileData SimInfo = null; | 69 | RegionProfileData SimInfo = null; |
@@ -72,7 +72,7 @@ namespace OpenSim.Grid.UserServer | |||
72 | SimInfo = RegionProfileData.RequestSimProfileData( | 72 | SimInfo = RegionProfileData.RequestSimProfileData( |
73 | theUser.CurrentAgent.Handle, m_config.GridServerURL, | 73 | theUser.CurrentAgent.Handle, m_config.GridServerURL, |
74 | m_config.GridSendKey, m_config.GridRecvKey); | 74 | m_config.GridSendKey, m_config.GridRecvKey); |
75 | 75 | ||
76 | if (SimInfo == null) | 76 | if (SimInfo == null) |
77 | { | 77 | { |
78 | m_log.Error("[GRID]: Region user was in isn't currently logged in"); | 78 | m_log.Error("[GRID]: Region user was in isn't currently logged in"); |
@@ -84,7 +84,7 @@ namespace OpenSim.Grid.UserServer | |||
84 | m_log.Error("[GRID]: Unable to look up region to log user off"); | 84 | m_log.Error("[GRID]: Unable to look up region to log user off"); |
85 | return; | 85 | return; |
86 | } | 86 | } |
87 | 87 | ||
88 | // Prepare notification | 88 | // Prepare notification |
89 | Hashtable SimParams = new Hashtable(); | 89 | Hashtable SimParams = new Hashtable(); |
90 | SimParams["agent_id"] = theUser.ID.ToString(); | 90 | SimParams["agent_id"] = theUser.ID.ToString(); |
@@ -101,7 +101,7 @@ namespace OpenSim.Grid.UserServer | |||
101 | m_log.InfoFormat( | 101 | m_log.InfoFormat( |
102 | "[ASSUMED CRASH]: Telling region {0} @ {1},{2} ({3}) that their agent is dead: {4}", | 102 | "[ASSUMED CRASH]: Telling region {0} @ {1},{2} ({3}) that their agent is dead: {4}", |
103 | SimInfo.regionName, SimInfo.regionLocX, SimInfo.regionLocY, SimInfo.httpServerURI, theUser.FirstName + " " + theUser.SurName); | 103 | SimInfo.regionName, SimInfo.regionLocX, SimInfo.regionLocY, SimInfo.httpServerURI, theUser.FirstName + " " + theUser.SurName); |
104 | 104 | ||
105 | try | 105 | try |
106 | { | 106 | { |
107 | XmlRpcRequest GridReq = new XmlRpcRequest("logoff_user", SendParams); | 107 | XmlRpcRequest GridReq = new XmlRpcRequest("logoff_user", SendParams); |
@@ -306,8 +306,6 @@ namespace OpenSim.Grid.UserServer | |||
306 | theUser.FirstName, theUser.SurName); | 306 | theUser.FirstName, theUser.SurName); |
307 | } | 307 | } |
308 | } | 308 | } |
309 | |||
310 | |||
311 | } | 309 | } |
312 | } | 310 | } |
313 | catch (Exception) | 311 | catch (Exception) |
@@ -419,7 +417,7 @@ namespace OpenSim.Grid.UserServer | |||
419 | else | 417 | else |
420 | { | 418 | { |
421 | response.CreateDeadRegionResponse(); | 419 | response.CreateDeadRegionResponse(); |
422 | } | 420 | } |
423 | } | 421 | } |
424 | 422 | ||
425 | catch (Exception e) | 423 | catch (Exception e) |
@@ -432,11 +430,11 @@ namespace OpenSim.Grid.UserServer | |||
432 | 430 | ||
433 | // See LoginService | 431 | // See LoginService |
434 | protected override InventoryData GetInventorySkeleton(LLUUID userID) | 432 | protected override InventoryData GetInventorySkeleton(LLUUID userID) |
435 | { | 433 | { |
436 | m_log.DebugFormat( | 434 | m_log.DebugFormat( |
437 | "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", | 435 | "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", |
438 | m_config.InventoryUrl, userID); | 436 | m_config.InventoryUrl, userID); |
439 | 437 | ||
440 | List<InventoryFolderBase> folders = m_inventoryService.GetInventorySkeleton(userID); | 438 | List<InventoryFolderBase> folders = m_inventoryService.GetInventorySkeleton(userID); |
441 | 439 | ||
442 | if (null == folders || folders.Count == 0) | 440 | if (null == folders || folders.Count == 0) |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index b1d95da..760dfe3 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -413,7 +413,7 @@ namespace OpenSim.Grid.UserServer | |||
413 | 413 | ||
414 | return ProfileToXmlRPCResponse(userProfile); | 414 | return ProfileToXmlRPCResponse(userProfile); |
415 | } | 415 | } |
416 | 416 | ||
417 | public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request) | 417 | public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request) |
418 | { | 418 | { |
419 | XmlRpcResponse response = new XmlRpcResponse(); | 419 | XmlRpcResponse response = new XmlRpcResponse(); |