From 6ef9d4da901a346c232458317cca6268da888e2e Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 18 Aug 2008 00:39:10 +0000 Subject: Formatting cleanup. --- OpenSim/Grid/UserServer/Main.cs | 21 ++++++++++----------- OpenSim/Grid/UserServer/UserLoginService.cs | 18 ++++++++---------- OpenSim/Grid/UserServer/UserManager.cs | 2 +- 3 files changed, 19 insertions(+), 22 deletions(-) (limited to 'OpenSim/Grid/UserServer') 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 public override void Startup() { base.Startup(); - + Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); m_stats = StatsManager.StartCollectingUserStats(); @@ -101,11 +101,11 @@ namespace OpenSim.Grid.UserServer m_gridInfoService = new GridInfoService(); - m_interServiceInventoryService = new OGS1InterServiceInventoryService(Cfg.InventoryUrl); + m_interServiceInventoryService = new OGS1InterServiceInventoryService(Cfg.InventoryUrl); m_loginService = new UserLoginService( - m_userManager, m_interServiceInventoryService, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); - + m_userManager, m_interServiceInventoryService, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); + m_messagesService = new MessageServersConnector(); m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; @@ -151,7 +151,6 @@ namespace OpenSim.Grid.UserServer m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod)); m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod); - m_httpServer.AddStreamHandler( new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); @@ -188,7 +187,7 @@ namespace OpenSim.Grid.UserServer tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); LLUUID userID = new LLUUID(); - + try { userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); @@ -199,7 +198,7 @@ namespace OpenSim.Grid.UserServer } try - { + { if (!m_interServiceInventoryService.CreateNewUserInventory(userID)) { throw new Exception( @@ -245,9 +244,9 @@ namespace OpenSim.Grid.UserServer // requester.ReturnResponseVal = TestResponse; // requester.BeginPostObject(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser); SynchronousRestObjectPoster.BeginPostObject>( - "POST", Cfg.InventoryUrl + "RootFolders/", m_lastCreatedUser); - break; - + "POST", Cfg.InventoryUrl + "RootFolders/", m_lastCreatedUser); + break; + case "logoff-user": if (cmdparams.Length >= 3) @@ -279,7 +278,7 @@ namespace OpenSim.Grid.UserServer m_loginService.LogOffUser(theUser, message); theUser.CurrentAgent.AgentOnline = false; - + m_loginService.CommitAgent(ref theUser); } 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 public class UserLoginService : LoginService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + protected IInterServiceInventoryServices m_inventoryService; public event UserLoggedInAtLocation OnUserLoggedInAtLocation; @@ -63,7 +63,7 @@ namespace OpenSim.Grid.UserServer m_config = config; m_inventoryService = inventoryService; } - + public override void LogOffUser(UserProfileData theUser, string message) { RegionProfileData SimInfo = null; @@ -72,7 +72,7 @@ namespace OpenSim.Grid.UserServer SimInfo = RegionProfileData.RequestSimProfileData( theUser.CurrentAgent.Handle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); - + if (SimInfo == null) { m_log.Error("[GRID]: Region user was in isn't currently logged in"); @@ -84,7 +84,7 @@ namespace OpenSim.Grid.UserServer m_log.Error("[GRID]: Unable to look up region to log user off"); return; } - + // Prepare notification Hashtable SimParams = new Hashtable(); SimParams["agent_id"] = theUser.ID.ToString(); @@ -101,7 +101,7 @@ namespace OpenSim.Grid.UserServer m_log.InfoFormat( "[ASSUMED CRASH]: Telling region {0} @ {1},{2} ({3}) that their agent is dead: {4}", SimInfo.regionName, SimInfo.regionLocX, SimInfo.regionLocY, SimInfo.httpServerURI, theUser.FirstName + " " + theUser.SurName); - + try { XmlRpcRequest GridReq = new XmlRpcRequest("logoff_user", SendParams); @@ -306,8 +306,6 @@ namespace OpenSim.Grid.UserServer theUser.FirstName, theUser.SurName); } } - - } } catch (Exception) @@ -419,7 +417,7 @@ namespace OpenSim.Grid.UserServer else { response.CreateDeadRegionResponse(); - } + } } catch (Exception e) @@ -432,11 +430,11 @@ namespace OpenSim.Grid.UserServer // See LoginService protected override InventoryData GetInventorySkeleton(LLUUID userID) - { + { m_log.DebugFormat( "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", m_config.InventoryUrl, userID); - + List folders = m_inventoryService.GetInventorySkeleton(userID); 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 return ProfileToXmlRPCResponse(userProfile); } - + public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request) { XmlRpcResponse response = new XmlRpcResponse(); -- cgit v1.1