diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
3 files changed, 28 insertions, 22 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b67db20..29476b9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -11728,14 +11728,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11728 | return UUID.Zero.ToString(); | 11728 | return UUID.Zero.ToString(); |
11729 | } | 11729 | } |
11730 | 11730 | ||
11731 | string reqIdentifier = UUID.Random().ToString(); | ||
11732 | |||
11731 | // was: UUID tid = tid = AsyncCommands. | 11733 | // was: UUID tid = tid = AsyncCommands. |
11732 | UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, assetID.ToString()); | 11734 | UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, reqIdentifier); |
11733 | 11735 | ||
11734 | if (NotecardCache.IsCached(assetID)) | 11736 | if (NotecardCache.IsCached(assetID)) |
11735 | { | 11737 | { |
11736 | AsyncCommands. | 11738 | AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(assetID).ToString()); |
11737 | DataserverPlugin.DataserverReply(assetID.ToString(), | 11739 | |
11738 | NotecardCache.GetLines(assetID).ToString()); | ||
11739 | ScriptSleep(100); | 11740 | ScriptSleep(100); |
11740 | return tid.ToString(); | 11741 | return tid.ToString(); |
11741 | } | 11742 | } |
@@ -11751,9 +11752,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11751 | string data = Encoding.UTF8.GetString(a.Data); | 11752 | string data = Encoding.UTF8.GetString(a.Data); |
11752 | //m_log.Debug(data); | 11753 | //m_log.Debug(data); |
11753 | NotecardCache.Cache(id, data); | 11754 | NotecardCache.Cache(id, data); |
11754 | AsyncCommands. | 11755 | AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(id).ToString()); |
11755 | DataserverPlugin.DataserverReply(id.ToString(), | ||
11756 | NotecardCache.GetLines(id).ToString()); | ||
11757 | }); | 11756 | }); |
11758 | 11757 | ||
11759 | ScriptSleep(100); | 11758 | ScriptSleep(100); |
@@ -11782,13 +11781,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11782 | return UUID.Zero.ToString(); | 11781 | return UUID.Zero.ToString(); |
11783 | } | 11782 | } |
11784 | 11783 | ||
11784 | string reqIdentifier = UUID.Random().ToString(); | ||
11785 | |||
11785 | // was: UUID tid = tid = AsyncCommands. | 11786 | // was: UUID tid = tid = AsyncCommands. |
11786 | UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, assetID.ToString()); | 11787 | UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, reqIdentifier); |
11787 | 11788 | ||
11788 | if (NotecardCache.IsCached(assetID)) | 11789 | if (NotecardCache.IsCached(assetID)) |
11789 | { | 11790 | { |
11790 | AsyncCommands.DataserverPlugin.DataserverReply(assetID.ToString(), | 11791 | AsyncCommands.DataserverPlugin.DataserverReply( |
11791 | NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); | 11792 | reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); |
11793 | |||
11792 | ScriptSleep(100); | 11794 | ScriptSleep(100); |
11793 | return tid.ToString(); | 11795 | return tid.ToString(); |
11794 | } | 11796 | } |
@@ -11804,8 +11806,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11804 | string data = Encoding.UTF8.GetString(a.Data); | 11806 | string data = Encoding.UTF8.GetString(a.Data); |
11805 | //m_log.Debug(data); | 11807 | //m_log.Debug(data); |
11806 | NotecardCache.Cache(id, data); | 11808 | NotecardCache.Cache(id, data); |
11807 | AsyncCommands.DataserverPlugin.DataserverReply(id.ToString(), | 11809 | AsyncCommands.DataserverPlugin.DataserverReply( |
11808 | NotecardCache.GetLine(id, line, m_notecardLineReadCharsMax)); | 11810 | reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); |
11809 | }); | 11811 | }); |
11810 | 11812 | ||
11811 | ScriptSleep(100); | 11813 | ScriptSleep(100); |
@@ -13287,7 +13289,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13287 | 13289 | ||
13288 | public static void Cache(UUID assetID, string text) | 13290 | public static void Cache(UUID assetID, string text) |
13289 | { | 13291 | { |
13290 | CacheCheck(); | 13292 | CheckCache(); |
13291 | 13293 | ||
13292 | lock (m_Notecards) | 13294 | lock (m_Notecards) |
13293 | { | 13295 | { |
@@ -13372,14 +13374,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13372 | return line; | 13374 | return line; |
13373 | } | 13375 | } |
13374 | 13376 | ||
13375 | public static void CacheCheck() | 13377 | public static void CheckCache() |
13376 | { | 13378 | { |
13377 | foreach (UUID key in new List<UUID>(m_Notecards.Keys)) | 13379 | lock (m_Notecards) |
13378 | { | 13380 | { |
13379 | Notecard nc = m_Notecards[key]; | 13381 | foreach (UUID key in new List<UUID>(m_Notecards.Keys)) |
13380 | if (nc.lastRef.AddSeconds(30) < DateTime.Now) | 13382 | { |
13381 | m_Notecards.Remove(key); | 13383 | Notecard nc = m_Notecards[key]; |
13384 | if (nc.lastRef.AddSeconds(30) < DateTime.Now) | ||
13385 | m_Notecards.Remove(key); | ||
13386 | } | ||
13382 | } | 13387 | } |
13383 | } | 13388 | } |
13384 | } | 13389 | } |
13385 | } | 13390 | } \ No newline at end of file |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index 2fe6948..d0922aa 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | |||
@@ -29,7 +29,6 @@ using System; | |||
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using System.Collections; | 30 | using System.Collections; |
31 | using System.Collections.Generic; | 31 | using System.Collections.Generic; |
32 | using System.Reflection; | ||
33 | using System.Runtime.Remoting.Lifetime; | 32 | using System.Runtime.Remoting.Lifetime; |
34 | using System.Threading; | 33 | using System.Threading; |
35 | using log4net; | 34 | using log4net; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 4c018d4..4a7f68b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2173,7 +2173,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2173 | m_host.AddScriptLPS(1); | 2173 | m_host.AddScriptLPS(1); |
2174 | 2174 | ||
2175 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2175 | IConfigSource config = m_ScriptEngine.ConfigSource; |
2176 | string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI", new string[]{"Startup"}); | 2176 | string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI", |
2177 | new string[] { "Startup", "Hypergrid" }, String.Empty); | ||
2177 | 2178 | ||
2178 | if (!string.IsNullOrEmpty(HomeURI)) | 2179 | if (!string.IsNullOrEmpty(HomeURI)) |
2179 | return HomeURI; | 2180 | return HomeURI; |
@@ -2194,7 +2195,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2194 | m_host.AddScriptLPS(1); | 2195 | m_host.AddScriptLPS(1); |
2195 | 2196 | ||
2196 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2197 | IConfigSource config = m_ScriptEngine.ConfigSource; |
2197 | string gatekeeperURI = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", new string[] {"Startup"}); | 2198 | string gatekeeperURI = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
2199 | new string[] { "Startup", "Hypergrid" }, String.Empty); | ||
2198 | 2200 | ||
2199 | if (!string.IsNullOrEmpty(gatekeeperURI)) | 2201 | if (!string.IsNullOrEmpty(gatekeeperURI)) |
2200 | return gatekeeperURI; | 2202 | return gatekeeperURI; |