diff options
author | UbitUmarov | 2016-08-13 23:41:57 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-13 23:41:57 +0100 |
commit | 1337f5f26e628dc7c5d038ffee5e957d95a72566 (patch) | |
tree | e022d04db0e0174ade41f0c497651f5ff2115c03 /OpenSim/Services | |
parent | add some wiring to have GetUserAccounts for multiple IDs on a single request... (diff) | |
download | opensim-SC-1337f5f26e628dc7c5d038ffee5e957d95a72566.zip opensim-SC-1337f5f26e628dc7c5d038ffee5e957d95a72566.tar.gz opensim-SC-1337f5f26e628dc7c5d038ffee5e957d95a72566.tar.bz2 opensim-SC-1337f5f26e628dc7c5d038ffee5e957d95a72566.tar.xz |
remove a parameter for detection of grid fail to suport getting multiple user accounts per call and handle it where needed.
Diffstat (limited to '')
5 files changed, 26 insertions, 8 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 1ef5ad2..6f613c1 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | |||
@@ -201,9 +201,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
201 | return null; | 201 | return null; |
202 | } | 202 | } |
203 | 203 | ||
204 | public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported) | 204 | public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs) |
205 | { | 205 | { |
206 | suported = false; | ||
207 | return null; | 206 | return null; |
208 | } | 207 | } |
209 | 208 | ||
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs index e625143..5bc7a1c 100644 --- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs +++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs | |||
@@ -191,7 +191,27 @@ namespace OpenSim.Services.Connectors | |||
191 | return accounts; | 191 | return accounts; |
192 | } | 192 | } |
193 | 193 | ||
194 | public virtual List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported) | 194 | public virtual List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs) |
195 | { | ||
196 | List<UserAccount> accs = new List<UserAccount>(); | ||
197 | bool multisuported = true; | ||
198 | accs = doGetMultiUserAccounts(scopeID, IDs, out multisuported); | ||
199 | if(multisuported) | ||
200 | return accs; | ||
201 | |||
202 | // service does not do multi accounts so need to do it one by one | ||
203 | |||
204 | UUID uuid = UUID.Zero; | ||
205 | foreach(string id in IDs) | ||
206 | { | ||
207 | if(UUID.TryParse(id, out uuid) && uuid != UUID.Zero) | ||
208 | accs.Add(GetUserAccount(scopeID,uuid)); | ||
209 | } | ||
210 | |||
211 | return accs; | ||
212 | } | ||
213 | |||
214 | private List<UserAccount> doGetMultiUserAccounts(UUID scopeID, List<string> IDs, out bool suported) | ||
195 | { | 215 | { |
196 | suported = true; | 216 | suported = true; |
197 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | 217 | Dictionary<string, object> sendData = new Dictionary<string, object>(); |
diff --git a/OpenSim/Services/HypergridService/UserAccountCache.cs b/OpenSim/Services/HypergridService/UserAccountCache.cs index 618bd97..25ffb63 100644 --- a/OpenSim/Services/HypergridService/UserAccountCache.cs +++ b/OpenSim/Services/HypergridService/UserAccountCache.cs | |||
@@ -100,9 +100,8 @@ namespace OpenSim.Services.HypergridService | |||
100 | return null; | 100 | return null; |
101 | } | 101 | } |
102 | 102 | ||
103 | public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported) | 103 | public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs) |
104 | { | 104 | { |
105 | suported = false; | ||
106 | return null; | 105 | return null; |
107 | } | 106 | } |
108 | 107 | ||
diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs index 1914040..c6f3ef3 100644 --- a/OpenSim/Services/Interfaces/IUserAccountService.cs +++ b/OpenSim/Services/Interfaces/IUserAccountService.cs | |||
@@ -187,7 +187,7 @@ namespace OpenSim.Services.Interfaces | |||
187 | /// <returns></returns> | 187 | /// <returns></returns> |
188 | List<UserAccount> GetUserAccounts(UUID scopeID, string query); | 188 | List<UserAccount> GetUserAccounts(UUID scopeID, string query); |
189 | List<UserAccount> GetUserAccountsWhere(UUID scopeID, string where); | 189 | List<UserAccount> GetUserAccountsWhere(UUID scopeID, string where); |
190 | List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported); | 190 | List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs); |
191 | 191 | ||
192 | /// <summary> | 192 | /// <summary> |
193 | /// Store the data given, wich replaces the stored data, therefore must be complete. | 193 | /// Store the data given, wich replaces the stored data, therefore must be complete. |
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index fbe5e3b..668fe53 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs | |||
@@ -265,9 +265,9 @@ namespace OpenSim.Services.UserAccountService | |||
265 | return MakeUserAccount(d[0]); | 265 | return MakeUserAccount(d[0]); |
266 | } | 266 | } |
267 | 267 | ||
268 | public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported) | 268 | public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs) |
269 | { | 269 | { |
270 | suported = true; | 270 | // do it one at a time db access should be fast, so no need to break its api |
271 | List<UserAccount> accs = new List<UserAccount>(); | 271 | List<UserAccount> accs = new List<UserAccount>(); |
272 | UUID uuid = UUID.Zero; | 272 | UUID uuid = UUID.Zero; |
273 | foreach(string id in IDs) | 273 | foreach(string id in IDs) |