diff --git a/OpenSim/Data/RegionProfileService.cs b/OpenSim/Data/RegionProfileService.cs
index f30bd1edcf..0cd40212b2 100644
--- a/OpenSim/Data/RegionProfileService.cs
+++ b/OpenSim/Data/RegionProfileService.cs
@@ -13,7 +13,7 @@ namespace OpenSim.Data
///
/// Request sim data based on arbitrary key/value
///
- private static RegionProfileData RequestSimData(Uri gridserverUrl, string gridserverSendkey, string keyField, string keyValue)
+ private RegionProfileData RequestSimData(Uri gridserverUrl, string gridserverSendkey, string keyField, string keyValue)
{
Hashtable requestData = new Hashtable();
requestData[keyField] = keyValue;
@@ -57,7 +57,7 @@ namespace OpenSim.Data
///
/// The sim profile. Null if there was a request failure
/// This method should be statics
- public static RegionProfileData RequestSimProfileData(UUID regionId, Uri gridserverUrl,
+ public RegionProfileData RequestSimProfileData(UUID regionId, Uri gridserverUrl,
string gridserverSendkey, string gridserverRecvkey)
{
return RequestSimData(gridserverUrl, gridserverSendkey, "region_UUID", regionId.Guid.ToString());
@@ -71,7 +71,7 @@ namespace OpenSim.Data
///
///
/// The sim profile. Null if there was a request failure
- public static RegionProfileData RequestSimProfileData(ulong region_handle, Uri gridserver_url,
+ public RegionProfileData RequestSimProfileData(ulong region_handle, Uri gridserver_url,
string gridserver_sendkey, string gridserver_recvkey)
{
return RequestSimData(gridserver_url, gridserver_sendkey, "region_handle", region_handle.ToString());
@@ -85,7 +85,7 @@ namespace OpenSim.Data
///
///
/// The sim profile. Null if there was a request failure
- public static RegionProfileData RequestSimProfileData(string regionName, Uri gridserverUrl,
+ public RegionProfileData RequestSimProfileData(string regionName, Uri gridserverUrl,
string gridserverSendkey, string gridserverRecvkey)
{
return RequestSimData(gridserverUrl, gridserverSendkey, "region_name_search", regionName );
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 3f75838fa9..70aaea399a 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 7dce157b3f..b11714a140 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);
}