diff options
author | Melanie Thielker | 2008-09-25 05:13:44 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-25 05:13:44 +0000 |
commit | f3c8963c86dbc969541ede80ae37eb59d26b7809 (patch) | |
tree | ff1e5cea74e9d5c2b73c476320a7bddf11d93766 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins | |
parent | Mantis#2123. Thank you kindly, Idb for a patch that solves: (diff) | |
download | opensim-SC-f3c8963c86dbc969541ede80ae37eb59d26b7809.zip opensim-SC-f3c8963c86dbc969541ede80ae37eb59d26b7809.tar.gz opensim-SC-f3c8963c86dbc969541ede80ae37eb59d26b7809.tar.bz2 opensim-SC-f3c8963c86dbc969541ede80ae37eb59d26b7809.tar.xz |
Convergence is almost complete. This brings the diff between the API to < 10k
and makes it use a common set of types in both engine. Fixes the issues with
running both engines and HTTP requests / listens / timers etc..
Also fixes a couple of minor Scene issues and a CTB by nullref.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins')
5 files changed, 13 insertions, 31 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs index 3d3fb05..0c77a9d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
58 | 58 | ||
59 | while (httpInfo != null) | 59 | while (httpInfo != null) |
60 | { | 60 | { |
61 | //m_ScriptEngine.Log.Info("[AsyncLSL]:" + httpInfo.response_body + httpInfo.status); | 61 | //System.Console.WriteLine("[AsyncLSL]:" + httpInfo.response_body + httpInfo.status); |
62 | 62 | ||
63 | // Deliver data to prim's remote_data handler | 63 | // Deliver data to prim's remote_data handler |
64 | // | 64 | // |
@@ -77,7 +77,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
77 | new LSL_Types.LSLString(httpInfo.response_body) | 77 | new LSL_Types.LSLString(httpInfo.response_body) |
78 | }; | 78 | }; |
79 | 79 | ||
80 | foreach (IScriptEngine e in m_CmdManager.ScriptEngines) | 80 | foreach (IEventReceiver e in m_CmdManager.ScriptEngines) |
81 | { | 81 | { |
82 | if (e.PostObjectEvent(httpInfo.localID, | 82 | if (e.PostObjectEvent(httpInfo.localID, |
83 | new EventParams("http_response", | 83 | new EventParams("http_response", |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs index b353cba..59d5060 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using OpenMetaverse; | 29 | using OpenMetaverse; |
30 | using OpenSim.Region.Environment.Interfaces; | 30 | using OpenSim.Region.Environment.Interfaces; |
31 | using OpenSim.Region.Environment.Modules.Scripting.WorldComm; | 31 | using OpenSim.Region.Environment.Modules.Scripting.WorldComm; |
32 | using OpenSim.Region.ScriptEngine.Interfaces; | ||
32 | using OpenSim.Region.ScriptEngine.Shared; | 33 | using OpenSim.Region.ScriptEngine.Shared; |
33 | using OpenSim.Region.ScriptEngine.Shared.Api; | 34 | using OpenSim.Region.ScriptEngine.Shared.Api; |
34 | 35 | ||
@@ -66,10 +67,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
66 | new LSL_Types.LSLString(lInfo.GetMessage()) | 67 | new LSL_Types.LSLString(lInfo.GetMessage()) |
67 | }; | 68 | }; |
68 | 69 | ||
69 | m_CmdManager.m_ScriptEngine.PostScriptEvent( | 70 | foreach (IEventReceiver e in m_CmdManager.ScriptEngines) |
70 | lInfo.GetItemID(), new EventParams( | 71 | { |
71 | "listen", resobj, | 72 | e.PostScriptEvent( |
72 | new DetectParams[0])); | 73 | lInfo.GetItemID(), new EventParams( |
74 | "listen", resobj, | ||
75 | new DetectParams[0])); | ||
76 | } | ||
73 | } | 77 | } |
74 | } | 78 | } |
75 | } | 79 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index d1e3921..9b0bc5b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -156,28 +156,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
156 | SensorSweep(ts); | 156 | SensorSweep(ts); |
157 | } | 157 | } |
158 | 158 | ||
159 | public LSL_Types.list GetSensorList(uint m_localID, UUID m_itemID) | ||
160 | { | ||
161 | lock (SenseLock) | ||
162 | { | ||
163 | Dictionary<UUID, LSL_Types.list> Obj = null; | ||
164 | if (!SenseEvents.TryGetValue(m_localID, out Obj)) | ||
165 | { | ||
166 | return null; | ||
167 | } | ||
168 | lock (Obj) | ||
169 | { | ||
170 | // Get script | ||
171 | LSL_Types.list SenseList = null; | ||
172 | if (!Obj.TryGetValue(m_itemID, out SenseList)) | ||
173 | { | ||
174 | return null; | ||
175 | } | ||
176 | return SenseList; | ||
177 | } | ||
178 | } | ||
179 | } | ||
180 | |||
181 | private void SensorSweep(SenseRepeatClass ts) | 159 | private void SensorSweep(SenseRepeatClass ts) |
182 | { | 160 | { |
183 | SceneObjectPart SensePoint = ts.host; | 161 | SceneObjectPart SensePoint = ts.host; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs index ec7cd35..91cef9b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs | |||
@@ -108,7 +108,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
108 | // Time has passed? | 108 | // Time has passed? |
109 | if (ts.next < DateTime.Now.Ticks) | 109 | if (ts.next < DateTime.Now.Ticks) |
110 | { | 110 | { |
111 | // Console.WriteLine("Time has passed: Now: " + DateTime.Now.Ticks + ", Passed: " + ts.next); | 111 | //Console.WriteLine("Time has passed: Now: " + DateTime.Now.Ticks + ", Passed: " + ts.next); |
112 | // Add it to queue | 112 | // Add it to queue |
113 | m_CmdManager.m_ScriptEngine.PostScriptEvent(ts.itemID, | 113 | m_CmdManager.m_ScriptEngine.PostScriptEvent(ts.itemID, |
114 | new EventParams("timer", new Object[0], | 114 | new EventParams("timer", new Object[0], |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/XmlRequest.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/XmlRequest.cs index a7699a1..1c1ea0b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/XmlRequest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/XmlRequest.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
71 | new LSL_Types.LSLString(rInfo.GetStrVal()) | 71 | new LSL_Types.LSLString(rInfo.GetStrVal()) |
72 | }; | 72 | }; |
73 | 73 | ||
74 | foreach (IScriptEngine e in m_CmdManager.ScriptEngines) | 74 | foreach (IEventReceiver e in m_CmdManager.ScriptEngines) |
75 | { | 75 | { |
76 | if (e.PostScriptEvent( | 76 | if (e.PostScriptEvent( |
77 | rInfo.GetItemID(), new EventParams( | 77 | rInfo.GetItemID(), new EventParams( |
@@ -100,7 +100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
100 | new LSL_Types.LSLString(srdInfo.sdata) | 100 | new LSL_Types.LSLString(srdInfo.sdata) |
101 | }; | 101 | }; |
102 | 102 | ||
103 | foreach (IScriptEngine e in m_CmdManager.ScriptEngines) | 103 | foreach (IEventReceiver e in m_CmdManager.ScriptEngines) |
104 | { | 104 | { |
105 | if (e.PostScriptEvent( | 105 | if (e.PostScriptEvent( |
106 | srdInfo.m_itemID, new EventParams( | 106 | srdInfo.m_itemID, new EventParams( |