From c3a4810e91a0357af9e8a9f0e43d450f3bb1b16f Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 12 Feb 2009 10:16:11 +0000 Subject: * Turned RegionProfileService non-static --- OpenSim/Grid/UserServer/Main.cs | 3 ++- OpenSim/Grid/UserServer/UserLoginService.cs | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'OpenSim/Grid/UserServer') diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 3f75838..70aaea3 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -32,6 +32,7 @@ using System.Reflection; using log4net; using log4net.Config; using OpenMetaverse; +using OpenSim.Data; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; @@ -167,7 +168,7 @@ namespace OpenSim.Grid.UserServer protected virtual void StartupLoginService(IInterServiceInventoryServices inventoryService) { m_loginService = new UserLoginService( - m_userManager, inventoryService, new LibraryRootFolder(Cfg.LibraryXmlfile), Cfg, Cfg.DefaultStartupMsg); + m_userManager, inventoryService, new LibraryRootFolder(Cfg.LibraryXmlfile), Cfg, Cfg.DefaultStartupMsg, new RegionProfileService()); } protected virtual void AddHttpHandlers() diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 7dce157..b11714a 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -59,15 +59,17 @@ namespace OpenSim.Grid.UserServer private UserLoggedInAtLocation handlerUserLoggedInAtLocation; public UserConfig m_config; + private readonly RegionProfileService m_regionProfileService; public UserLoginService( UserManagerBase userManager, IInterServiceInventoryServices inventoryService, LibraryRootFolder libraryRootFolder, - UserConfig config, string welcomeMess) + UserConfig config, string welcomeMess, RegionProfileService regionProfileService) : base(userManager, libraryRootFolder, welcomeMess) { m_config = config; m_inventoryService = inventoryService; + m_regionProfileService = regionProfileService; } public void setloginlevel(int level) @@ -86,7 +88,7 @@ namespace OpenSim.Grid.UserServer RegionProfileData SimInfo; try { - SimInfo = RegionProfileService.RequestSimProfileData( + SimInfo = m_regionProfileService.RequestSimProfileData( theUser.CurrentAgent.Handle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); @@ -302,20 +304,20 @@ namespace OpenSim.Grid.UserServer protected RegionProfileData RequestClosestRegion(string region) { - return RegionProfileService.RequestSimProfileData(region, + return m_regionProfileService.RequestSimProfileData(region, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); } protected RegionProfileData GetRegionInfo(ulong homeRegionHandle) { - return RegionProfileService.RequestSimProfileData(homeRegionHandle, + return m_regionProfileService.RequestSimProfileData(homeRegionHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); } protected RegionProfileData GetRegionInfo(UUID homeRegionId) { - return RegionProfileService.RequestSimProfileData(homeRegionId, + return m_regionProfileService.RequestSimProfileData(homeRegionId, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); } -- cgit v1.1