diff options
author | Justin Clarke Casey | 2008-03-29 22:18:44 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-03-29 22:18:44 +0000 |
commit | 875211b262ecda2eced68b217221dead20cbdb6b (patch) | |
tree | e84ecb6149076e71ce6d9fedeea5f0c49ca46d93 /OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |
parent | * Updating ODE Libraries to release / dNODEBUG (diff) | |
download | opensim-SC-875211b262ecda2eced68b217221dead20cbdb6b.zip opensim-SC-875211b262ecda2eced68b217221dead20cbdb6b.tar.gz opensim-SC-875211b262ecda2eced68b217221dead20cbdb6b.tar.bz2 opensim-SC-875211b262ecda2eced68b217221dead20cbdb6b.tar.xz |
* Various 1.19.0.5 grid inventory request fixes. These will only take affect once the region and the grid servers have upgraded to this revision
* You may also need to clear your cache before seeing any effect.
* These fixes may or may not affect inventory on the RC client.
* These fixes should make non-root folders work better, stop inventory failure on first login, allow trash to be emptied and make texture picker in object edit view work properly
* Fixes are 1) make initial root folder request wait for async inventory delivery, 2) deliver all folders in the initial login skeleton, not just the root child ones and 3) deal
with situations where we receive child folders from the inventory service before their parent is received.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 67022c7..c3f51da 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -27,7 +27,10 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Threading; | ||
31 | |||
30 | using libsecondlife; | 32 | using libsecondlife; |
33 | |||
31 | using OpenSim.Framework.Console; | 34 | using OpenSim.Framework.Console; |
32 | 35 | ||
33 | namespace OpenSim.Framework.Communications.Cache | 36 | namespace OpenSim.Framework.Communications.Cache |
@@ -65,9 +68,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
65 | 68 | ||
66 | if (userInfo.UserProfile != null) | 69 | if (userInfo.UserProfile != null) |
67 | { | 70 | { |
68 | // The request itself will occur when the agent finishes logging on to the region | 71 | // The inventory will be populated when the user actually enters the scene |
69 | // so there's no need to do it here. | ||
70 | //RequestInventoryForUser(userID, userInfo); | ||
71 | m_userProfiles.Add(userID, userInfo); | 72 | m_userProfiles.Add(userID, userInfo); |
72 | } | 73 | } |
73 | else | 74 | else |
@@ -219,10 +220,34 @@ namespace OpenSim.Framework.Communications.Cache | |||
219 | CachedUserInfo userProfile; | 220 | CachedUserInfo userProfile; |
220 | if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) | 221 | if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) |
221 | { | 222 | { |
223 | // XXX: When a client crosses into a scene, their entire inventory is fetched | ||
224 | // asynchronously. However, if the client is logging on and does not have a cached root | ||
225 | // folder, then the root folder request usually comes in *before* the async completes, leading to | ||
226 | // inventory failure. | ||
227 | // | ||
228 | // This is a crude way of dealing with that by retrying the lookup. | ||
229 | if (userProfile.RootFolder == null) | ||
230 | { | ||
231 | int attempts = 5; | ||
232 | while (attempts-- > 0) | ||
233 | { | ||
234 | Thread.Sleep(3000); | ||
235 | |||
236 | if (userProfile.RootFolder != null) | ||
237 | { | ||
238 | break; | ||
239 | } | ||
240 | } | ||
241 | } | ||
242 | |||
222 | if (userProfile.RootFolder != null) | 243 | if (userProfile.RootFolder != null) |
223 | { | 244 | { |
224 | if (userProfile.RootFolder.folderID == folderID) | 245 | if (userProfile.RootFolder.folderID == folderID) |
225 | { | 246 | { |
247 | // m_log.DebugFormat( | ||
248 | // "[AGENT INVENTORY]: Found root folder {0} for client {1}", | ||
249 | // folderID, remoteClient.AgentId); | ||
250 | |||
226 | remoteClient.SendInventoryFolderDetails( | 251 | remoteClient.SendInventoryFolderDetails( |
227 | remoteClient.AgentId, folderID, userProfile.RootFolder.RequestListOfItems(), | 252 | remoteClient.AgentId, folderID, userProfile.RootFolder.RequestListOfItems(), |
228 | userProfile.RootFolder.RequestListOfFolders(), | 253 | userProfile.RootFolder.RequestListOfFolders(), |
@@ -234,6 +259,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
234 | { | 259 | { |
235 | if ((fold = userProfile.RootFolder.HasSubFolder(folderID)) != null) | 260 | if ((fold = userProfile.RootFolder.HasSubFolder(folderID)) != null) |
236 | { | 261 | { |
262 | // m_log.DebugFormat( | ||
263 | // "[AGENT INVENTORY]: Found folder {0} for client {1}", | ||
264 | // folderID, remoteClient.AgentId); | ||
265 | |||
237 | remoteClient.SendInventoryFolderDetails( | 266 | remoteClient.SendInventoryFolderDetails( |
238 | remoteClient.AgentId, folderID, fold.RequestListOfItems(), | 267 | remoteClient.AgentId, folderID, fold.RequestListOfItems(), |
239 | fold.RequestListOfFolders(), fetchFolders, fetchItems); | 268 | fold.RequestListOfFolders(), fetchFolders, fetchItems); |