From 8d724e90de0fb3b406f82f4e06b6f5b79c5a538c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 16 Jan 2015 22:44:54 +0000
Subject: For scripts in attachments, don't save .state files apart from the
initial one as these are ignored since .state is saved in the attachment's
asset.
This eliminates pointless work and exceptions when an appdomain is unloaded whilst an attachment script state is persisted.
Adds test for this case.
Relates to http://opensimulator.org/mantis/view.php?id=7407
---
OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs')
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index 1097efb..35e5f18 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -98,6 +98,12 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
string State { get; set; }
///
+ /// If true then the engine is responsible for persisted state. If false then some other component may
+ /// persist state (e.g. attachments persisting in assets).
+ ///
+ bool StatePersistedHere { get; }
+
+ ///
/// Time the script was last started
///
DateTime TimeStarted { get; }
--
cgit v1.1