aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-21 21:47:00 +0000
committerMelanie Thielker2008-09-21 21:47:00 +0000
commit94aaf67dfaafbcbd4d871f674c465a34c1c1f332 (patch)
tree33476e5660a95bdf7d29d14beae67a6294af28a7 /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
parent* minor: warnings removal (diff)
downloadopensim-SC_OLD-94aaf67dfaafbcbd4d871f674c465a34c1c1f332.zip
opensim-SC_OLD-94aaf67dfaafbcbd4d871f674c465a34c1c1f332.tar.gz
opensim-SC_OLD-94aaf67dfaafbcbd4d871f674c465a34c1c1f332.tar.bz2
opensim-SC_OLD-94aaf67dfaafbcbd4d871f674c465a34c1c1f332.tar.xz
Change the scirpt engine loading mechanism. Script engines are now
ordinary region modules and are able to coexist in one instance. See http://opensimulator.org/wiki/ScriptEngines for details. There were changes to OpenSim.ini.example, please note DefaultScriptEngine. Also see the User docs and FAQ on the Wiki. Default is DotNetEngine.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
index 60333b1..47cb2fd 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
@@ -64,6 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
64 private static bool PrivateThread; 64 private static bool PrivateThread;
65 private int LoadUnloadMaxQueueSize; 65 private int LoadUnloadMaxQueueSize;
66 private Object scriptLock = new Object(); 66 private Object scriptLock = new Object();
67 private bool m_started = false;
67 68
68 // Load/Unload structure 69 // Load/Unload structure
69 private struct LUStruct 70 private struct LUStruct
@@ -119,6 +120,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
119 public abstract void Initialize(); 120 public abstract void Initialize();
120 public void Start() 121 public void Start()
121 { 122 {
123 m_started = true;
124
122 ReadConfig(); 125 ReadConfig();
123 Initialize(); 126 Initialize();
124 127
@@ -213,6 +216,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
213 216
214 public void DoScriptLoadUnload() 217 public void DoScriptLoadUnload()
215 { 218 {
219 if (!m_started)
220 return;
221
216 lock (LUQueue) 222 lock (LUQueue)
217 { 223 {
218 if (LUQueue.Count > 0) 224 if (LUQueue.Count > 0)
@@ -258,7 +264,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
258 { 264 {
259 lock (LUQueue) 265 lock (LUQueue)
260 { 266 {
261 if (LUQueue.Count >= LoadUnloadMaxQueueSize) 267 if ((LUQueue.Count >= LoadUnloadMaxQueueSize) && m_started)
262 { 268 {
263 m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: ERROR: Load/unload queue item count is at " + LUQueue.Count + ". Config variable \"LoadUnloadMaxQueueSize\" is set to " + LoadUnloadMaxQueueSize + ", so ignoring new script."); 269 m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: ERROR: Load/unload queue item count is at " + LUQueue.Count + ". Config variable \"LoadUnloadMaxQueueSize\" is set to " + LoadUnloadMaxQueueSize + ", so ignoring new script.");
264 return; 270 return;