From 522d6261f11ffaf8320c3f0775beb5d0608ce226 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 16 Sep 2011 00:12:12 +0100
Subject: Correctly create a freshly created estate owner's default items and
avatar entries on standalone if applicable.
---
.../LocalUserAccountServiceConnector.cs | 26 +++++++++++++---------
1 file changed, 15 insertions(+), 11 deletions(-)
(limited to 'OpenSim/Region/CoreModules')
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
index 30ebb21..546fe88 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
@@ -45,7 +45,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
- private IUserAccountService m_UserService;
+ ///
+ /// This is not on the IUserAccountService. It's only being used so that standalone scenes can punch through
+ /// to a local UserAccountService when setting up an estate manager.
+ ///
+ public IUserAccountService UserAccountService { get; private set; }
+
private UserAccountCache m_Cache;
private bool m_Enabled = false;
@@ -86,9 +91,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
}
Object[] args = new Object[] { source };
- m_UserService = ServerUtils.LoadPlugin(serviceDll, args);
+ UserAccountService = ServerUtils.LoadPlugin(serviceDll, args);
- if (m_UserService == null)
+ if (UserAccountService == null)
{
m_log.ErrorFormat(
"[LOCAL USER ACCOUNT SERVICE CONNECTOR]: Cannot load user account service specified as {0}", serviceDll);
@@ -119,7 +124,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
if (!m_Enabled)
return;
- scene.RegisterModuleInterface(m_UserService);
+ scene.RegisterModuleInterface(UserAccountService);
}
public void RemoveRegion(Scene scene)
@@ -147,7 +152,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
if (inCache)
return account;
- account = m_UserService.GetUserAccount(scopeID, userID);
+ account = UserAccountService.GetUserAccount(scopeID, userID);
m_Cache.Cache(userID, account);
return account;
@@ -160,7 +165,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
if (inCache)
return account;
- account = m_UserService.GetUserAccount(scopeID, firstName, lastName);
+ account = UserAccountService.GetUserAccount(scopeID, firstName, lastName);
if (account != null)
m_Cache.Cache(account.PrincipalID, account);
@@ -169,22 +174,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
public UserAccount GetUserAccount(UUID scopeID, string Email)
{
- return m_UserService.GetUserAccount(scopeID, Email);
+ return UserAccountService.GetUserAccount(scopeID, Email);
}
public List GetUserAccounts(UUID scopeID, string query)
{
- return m_UserService.GetUserAccounts(scopeID, query);
+ return UserAccountService.GetUserAccounts(scopeID, query);
}
// Update all updatable fields
//
public bool StoreUserAccount(UserAccount data)
{
- return m_UserService.StoreUserAccount(data);
+ return UserAccountService.StoreUserAccount(data);
}
#endregion
-
}
-}
+}
\ No newline at end of file
--
cgit v1.1