aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-08-01 18:49:48 +0000
committerJustin Clarke Casey2008-08-01 18:49:48 +0000
commit43b2ff1d112174c36bb18caf353945afc6390840 (patch)
tree2da70a8856c417dcfb66f75fb38a4bde2b73c57f /OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
parent* minor: eliminate some unused variables in InventoryFolderImpl (diff)
downloadopensim-SC-43b2ff1d112174c36bb18caf353945afc6390840.zip
opensim-SC-43b2ff1d112174c36bb18caf353945afc6390840.tar.gz
opensim-SC-43b2ff1d112174c36bb18caf353945afc6390840.tar.bz2
opensim-SC-43b2ff1d112174c36bb18caf353945afc6390840.tar.xz
* Drop cached inventory from the local region when a user crosses out into a remote region
* May resolves inventory problems that occur when the user moves between two regions` * e.g. if the user moves to a second region, adds an inventory item, moves back to the original region then tries to manipulate that item * Not yet implemented for teleport
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/CachedUserInfo.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 025b934..d85eda0 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Framework.Communications.Cache
75 private readonly IList<IInventoryRequest> m_pendingRequests = new List<IInventoryRequest>(); 75 private readonly IList<IInventoryRequest> m_pendingRequests = new List<IInventoryRequest>();
76 76
77 /// <summary> 77 /// <summary>
78 /// The root folder of this user's inventory. Returns null if the inventory has not yet been received. 78 /// The root folder of this user's inventory. Returns null if the root folder has not yet been received.
79 /// </summary> 79 /// </summary>
80 public InventoryFolderImpl RootFolder { get { return m_rootFolder; } } 80 public InventoryFolderImpl RootFolder { get { return m_rootFolder; } }
81 private InventoryFolderImpl m_rootFolder; 81 private InventoryFolderImpl m_rootFolder;
@@ -183,6 +183,21 @@ namespace OpenSim.Framework.Communications.Cache
183 } 183 }
184 } 184 }
185 } 185 }
186
187 /// <summary>
188 /// Drop all cached inventory.
189 /// </summary>
190 public void DropInventory()
191 {
192 // Make sure there aren't pending requests around when we do this
193 // FIXME: There is still a race condition where an inventory operation can be requested (since these aren't being locked).
194 // Will have to extend locking to exclude this very soon.
195 lock (m_pendingRequests)
196 {
197 m_hasReceivedInventory = false;
198 m_rootFolder = null;
199 }
200 }
186 201
187 /// <summary> 202 /// <summary>
188 /// Callback invoked when the inventory is received from an async request to the inventory service 203 /// Callback invoked when the inventory is received from an async request to the inventory service