aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
diff options
context:
space:
mode:
authorOren Hurvitz2012-08-09 14:51:05 +0300
committerJustin Clark-Casey (justincc)2013-01-02 22:28:41 +0000
commit9784e4e07db63a23897876dfbd27974878d5eca9 (patch)
tree07a56bc67cc6f6097217e05b62d7428cad9bb96f /OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
parentIf Save OAR/IAR times-out while waiting for assets then notify the caller tha... (diff)
downloadopensim-SC_OLD-9784e4e07db63a23897876dfbd27974878d5eca9.zip
opensim-SC_OLD-9784e4e07db63a23897876dfbd27974878d5eca9.tar.gz
opensim-SC_OLD-9784e4e07db63a23897876dfbd27974878d5eca9.tar.bz2
opensim-SC_OLD-9784e4e07db63a23897876dfbd27974878d5eca9.tar.xz
Changed locks to prevent deadlocks (especially during multi-region Load OAR)
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
index f9cc0cf..9b51cc8 100644
--- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
@@ -490,11 +490,14 @@ namespace OpenSim.Region.CoreModules.World.Land
490 490
491 m_Scene.ForEachSOG(AddObject); 491 m_Scene.ForEachSOG(AddObject);
492 492
493 List<UUID> primcountKeys = new List<UUID>(m_PrimCounts.Keys); 493 lock (m_PrimCounts)
494 foreach (UUID k in primcountKeys)
495 { 494 {
496 if (!m_OwnerMap.ContainsKey(k)) 495 List<UUID> primcountKeys = new List<UUID>(m_PrimCounts.Keys);
497 m_PrimCounts.Remove(k); 496 foreach (UUID k in primcountKeys)
497 {
498 if (!m_OwnerMap.ContainsKey(k))
499 m_PrimCounts.Remove(k);
500 }
498 } 501 }
499 502
500 m_Tainted = false; 503 m_Tainted = false;