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.
This commit is contained in:
Dr Scofield
2009-01-28 09:52:09 +00:00
parent a3ac702941
commit ce1e1854b1
3 changed files with 61 additions and 41 deletions

View File

@@ -73,6 +73,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
void RemoveState();
void Init();
void Start();
bool Stop(int timeout);
void SetState(string state);