Fix scope support to get friends list names across co-hosted grids

This commit is contained in:
Melanie
2019-08-07 17:58:08 +01:00
parent 24aa13239c
commit d781742d8e
7 changed files with 37 additions and 20 deletions

View File

@@ -485,7 +485,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
return user.FirstName + " " + user.LastName;
}
public virtual Dictionary<UUID,string> GetUsersNames(string[] ids)
public virtual Dictionary<UUID,string> GetUsersNames(string[] ids, UUID scopeID)
{
Dictionary<UUID,string> ret = new Dictionary<UUID,string>();
if(m_Scenes.Count <= 0)
@@ -528,7 +528,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
// try user account service
List<UserAccount> accounts = m_Scenes[0].UserAccountService.GetUserAccounts(
m_Scenes[0].RegionInfo.ScopeID, missing);
scopeID, missing);
if(accounts.Count != 0)
{

View File

@@ -164,6 +164,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
public override List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs)
{
m_log.DebugFormat("[REMOTE USER ACCOUNTS]: Request for {0} records", IDs.Count);
List<UserAccount> accs = new List<UserAccount>();
List<string> missing = new List<string>();
@@ -177,9 +178,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
{
account = m_Cache.Get(uuid, out inCache);
if (inCache)
{
accs.Add(account);
m_log.DebugFormat("[REMOTE USER ACCOUNTS]: Found in cache: {0}, is null {1}", uuid, account == null);
}
else
{
missing.Add(id);
}
}
}
@@ -198,6 +204,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
}
}
}
m_log.DebugFormat("[REMOTE USER ACCOUNTS]: returned {0} records", accs.Count);
return accs;
}