aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-27 17:50:07 +0000
committerMelanie Thielker2008-08-27 17:50:07 +0000
commita12f65234708c6a0ff9e08193aa65ce15a96326d (patch)
treee5882ec3b639754af6f28ffc94bd07fb168093a0 /OpenSim/Region
parentget rid of the "drop if exists" lines in this old migration, as those (diff)
downloadopensim-SC-a12f65234708c6a0ff9e08193aa65ce15a96326d.zip
opensim-SC-a12f65234708c6a0ff9e08193aa65ce15a96326d.tar.gz
opensim-SC-a12f65234708c6a0ff9e08193aa65ce15a96326d.tar.bz2
opensim-SC-a12f65234708c6a0ff9e08193aa65ce15a96326d.tar.xz
Make the check on inventory cache clearing more robust. Addresses
Mantis #1975 in a broader way. This may or may not prop up secure inventory a bit better, but I still recommend to disable it
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
index bf55e7b..d036dbb 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
@@ -233,13 +233,49 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
233 public bool NeedSceneCacheClear(LLUUID agentID, Scene scene) 233 public bool NeedSceneCacheClear(LLUUID agentID, Scene scene)
234 { 234 {
235 if (!m_AgentRegions.ContainsKey(agentID)) 235 if (!m_AgentRegions.ContainsKey(agentID))
236 {
237 // Since we can get here two ways, we need to scan
238 // the scenes here. This is somewhat more expensive
239 // but helps avoid a nasty bug
240 //
241
242 foreach (Scene s in m_Scenelist)
243 {
244 ScenePresence presence;
245
246 if (s.TryGetAvatar(agentID, out presence))
247 {
248 // If the agent is in this scene, then we
249 // are being called twice in a single
250 // teleport. This is wasteful of cycles
251 // but harmless due to this 2nd level check
252 //
253 // If the agent is found in another scene
254 // then the list wasn't current
255 //
256 // If the agent is totally unknown, then what
257 // are we even doing here??
258 //
259 if (s == scene)
260 return true;
261 else
262 return false;
263 }
264 }
236 return true; 265 return true;
266 }
237 267
268 // The agent is left in current Scene, so we must be
269 // going to another instance
270 //
238 if (m_AgentRegions[agentID] == scene) 271 if (m_AgentRegions[agentID] == scene)
239 { 272 {
240 m_AgentRegions.Remove(agentID); 273 m_AgentRegions.Remove(agentID);
241 return true; 274 return true;
242 } 275 }
276
277 // Another region has claimed the agent
278 //
243 return false; 279 return false;
244 } 280 }
245 281