remove a parameter for detection of grid fail to suport getting multiple user accounts per call and handle it where needed.

LSLKeyTest
UbitUmarov 2016-08-13 23:41:57 +01:00
parent 7c1b2a5dde
commit 1337f5f26e
7 changed files with 31 additions and 15 deletions

View File

@ -182,9 +182,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
return UserAccountService.GetUserAccount(scopeID, Email);
}
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported)
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs)
{
return UserAccountService.GetUserAccounts(scopeID, IDs, out suported);
return UserAccountService.GetUserAccounts(scopeID, IDs);
}

View File

@ -160,9 +160,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
return account;
}
public override List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported)
public override List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs)
{
suported = true;
List<UserAccount> accs = new List<UserAccount>();
List<string> missing = new List<string>();
@ -184,15 +183,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
if(missing.Count > 0)
{
List<UserAccount> ext = base.GetUserAccounts(scopeID, missing, out suported);
if(suported && ext != null)
List<UserAccount> ext = base.GetUserAccounts(scopeID, missing);
if(ext != null)
accs.AddRange(ext);
}
return accs;
}
public override bool StoreUserAccount(UserAccount data)
{
// This remote connector refuses to serve this method

View File

@ -201,9 +201,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
return null;
}
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported)
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs)
{
suported = false;
return null;
}

View File

@ -191,7 +191,27 @@ namespace OpenSim.Services.Connectors
return accounts;
}
public virtual List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported)
public virtual List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs)
{
List<UserAccount> accs = new List<UserAccount>();
bool multisuported = true;
accs = doGetMultiUserAccounts(scopeID, IDs, out multisuported);
if(multisuported)
return accs;
// service does not do multi accounts so need to do it one by one
UUID uuid = UUID.Zero;
foreach(string id in IDs)
{
if(UUID.TryParse(id, out uuid) && uuid != UUID.Zero)
accs.Add(GetUserAccount(scopeID,uuid));
}
return accs;
}
private List<UserAccount> doGetMultiUserAccounts(UUID scopeID, List<string> IDs, out bool suported)
{
suported = true;
Dictionary<string, object> sendData = new Dictionary<string, object>();

View File

@ -100,9 +100,8 @@ namespace OpenSim.Services.HypergridService
return null;
}
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported)
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs)
{
suported = false;
return null;
}

View File

@ -187,7 +187,7 @@ namespace OpenSim.Services.Interfaces
/// <returns></returns>
List<UserAccount> GetUserAccounts(UUID scopeID, string query);
List<UserAccount> GetUserAccountsWhere(UUID scopeID, string where);
List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported);
List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs);
/// <summary>
/// Store the data given, wich replaces the stored data, therefore must be complete.

View File

@ -265,9 +265,9 @@ namespace OpenSim.Services.UserAccountService
return MakeUserAccount(d[0]);
}
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported)
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs)
{
suported = true;
// do it one at a time db access should be fast, so no need to break its api
List<UserAccount> accs = new List<UserAccount>();
UUID uuid = UUID.Zero;
foreach(string id in IDs)