aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs17
1 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ec24dc2..ab087af 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -11689,7 +11689,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11689 11689
11690 public static void Cache(UUID assetID, string text) 11690 public static void Cache(UUID assetID, string text)
11691 { 11691 {
11692 CacheCheck(); 11692 CheckCache();
11693 11693
11694 lock (m_Notecards) 11694 lock (m_Notecards)
11695 { 11695 {
@@ -11774,14 +11774,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11774 return line; 11774 return line;
11775 } 11775 }
11776 11776
11777 public static void CacheCheck() 11777 public static void CheckCache()
11778 { 11778 {
11779 foreach (UUID key in new List<UUID>(m_Notecards.Keys)) 11779 lock (m_Notecards)
11780 { 11780 {
11781 Notecard nc = m_Notecards[key]; 11781 foreach (UUID key in new List<UUID>(m_Notecards.Keys))
11782 if (nc.lastRef.AddSeconds(30) < DateTime.Now) 11782 {
11783 m_Notecards.Remove(key); 11783 Notecard nc = m_Notecards[key];
11784 if (nc.lastRef.AddSeconds(30) < DateTime.Now)
11785 m_Notecards.Remove(key);
11786 }
11784 } 11787 }
11785 } 11788 }
11786 } 11789 }
11787} 11790} \ No newline at end of file