From 7e0936e4b6ec0596390266a8435dea9c3f19f09c Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 26 Mar 2012 14:19:55 +0100 Subject: Add a hust UUID to the script invocations --- .../Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | 11 ++++++++++- OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs | 1 + OpenSim/Region/ScriptEngine/Shared/Api/Runtime/MOD_Stub.cs | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index 1bcbcd3..7c07e15 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs @@ -122,6 +122,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// The name of the function to invoke /// List of parameters /// string result of the invocation + public void modInvokeN(string fname, params object[] parms) + { + Type returntype = m_comms.LookupReturnType(fname); + if (returntype != typeof(string)) + MODError(String.Format("return type mismatch for {0}",fname)); + + modInvoke(fname,parms); + } + public LSL_String modInvokeS(string fname, params object[] parms) { Type returntype = m_comms.LookupReturnType(fname); @@ -243,7 +252,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // non-null but don't trust it completely try { - object result = m_comms.InvokeOperation(m_itemID,fname,convertedParms); + object result = m_comms.InvokeOperation(m_host.UUID, m_itemID, fname, convertedParms); if (result != null) return result; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs index d258f76..aa78aaa 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs @@ -41,6 +41,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces public interface IMOD_Api { // Invocation functions + void modInvokeN(string fname, params object[] parms); LSL_String modInvokeS(string fname, params object[] parms); LSL_Integer modInvokeI(string fname, params object[] parms); LSL_Float modInvokeF(string fname, params object[] parms); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/MOD_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/MOD_Stub.cs index e7a4b2b..1c47138 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/MOD_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/MOD_Stub.cs @@ -62,6 +62,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_MOD_Functions = (IMOD_Api)api; } + public void modInvokeN(string fname, params object[] parms) + { + m_MOD_Functions.modInvokeN(fname, parms); + } + public LSL_String modInvokeS(string fname, params object[] parms) { return m_MOD_Functions.modInvokeS(fname, parms); -- cgit v1.1