aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Interfaces
diff options
context:
space:
mode:
authorDr Scofield2009-01-28 09:52:09 +0000
committerDr Scofield2009-01-28 09:52:09 +0000
commitce1e1854b129c2e223b399857b2e0c1a842c7186 (patch)
treef751c3dced33f681eacf1cac5d2fd96ee6058680 /OpenSim/Region/ScriptEngine/Interfaces
parentFrom: Christopher Yeoh <yeohc@au1.ibm.com> (diff)
downloadopensim-SC-ce1e1854b129c2e223b399857b2e0c1a842c7186.zip
opensim-SC-ce1e1854b129c2e223b399857b2e0c1a842c7186.tar.gz
opensim-SC-ce1e1854b129c2e223b399857b2e0c1a842c7186.tar.bz2
opensim-SC-ce1e1854b129c2e223b399857b2e0c1a842c7186.tar.xz
From: Christopher Yeoh <yeohc@au1.ibm.com>
This changeset fixes a race condition where a script (XEngine run) can startup before a reference is added to it in all of the required places in the XEngine class. The effect of this is that a script can sometimes on startup miss script events. For example a script which starts up and initialises itself from a notecard may never receive the dataserver event containing the notecard information. The patch isn't as clean as I'd like - I've split the constructor of ScriptInstance up so it does everything it did before except call Startup and post events like state_entry and on_rez. An Init function has been added which is called after the ScriptInstance object has been added to the necessary data structures in XEngine. Happy to rework it if someone suggests a better way of doing it.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Interfaces')
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs1
1 files changed, 1 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index 3367b77..017a6ba 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -73,6 +73,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
73 73
74 void RemoveState(); 74 void RemoveState();
75 75
76 void Init();
76 void Start(); 77 void Start();
77 bool Stop(int timeout); 78 bool Stop(int timeout);
78 void SetState(string state); 79 void SetState(string state);