diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins')
4 files changed, 44 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs index 7fa19b1..9f78a49 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs | |||
@@ -38,6 +38,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
38 | { | 38 | { |
39 | public AsyncCommandManager m_CmdManager; | 39 | public AsyncCommandManager m_CmdManager; |
40 | 40 | ||
41 | public int DataserverRequestsCount | ||
42 | { | ||
43 | get | ||
44 | { | ||
45 | lock (DataserverRequests) | ||
46 | return DataserverRequests.Count; | ||
47 | } | ||
48 | } | ||
49 | |||
41 | private Dictionary<string, DataserverRequest> DataserverRequests = | 50 | private Dictionary<string, DataserverRequest> DataserverRequests = |
42 | new Dictionary<string, DataserverRequest>(); | 51 | new Dictionary<string, DataserverRequest>(); |
43 | 52 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs index 740816f..93e0261 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs | |||
@@ -42,22 +42,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
42 | 42 | ||
43 | public AsyncCommandManager m_CmdManager; | 43 | public AsyncCommandManager m_CmdManager; |
44 | 44 | ||
45 | private IWorldComm m_commsPlugin; | ||
46 | |||
47 | public int ListenerCount | ||
48 | { | ||
49 | get { return m_commsPlugin.ListenerCount; } | ||
50 | } | ||
51 | |||
45 | public Listener(AsyncCommandManager CmdManager) | 52 | public Listener(AsyncCommandManager CmdManager) |
46 | { | 53 | { |
47 | m_CmdManager = CmdManager; | 54 | m_CmdManager = CmdManager; |
55 | m_commsPlugin = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | ||
48 | } | 56 | } |
49 | 57 | ||
50 | public void CheckListeners() | 58 | public void CheckListeners() |
51 | { | 59 | { |
52 | if (m_CmdManager.m_ScriptEngine.World == null) | 60 | if (m_CmdManager.m_ScriptEngine.World == null) |
53 | return; | 61 | return; |
54 | IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | ||
55 | 62 | ||
56 | if (comms != null) | 63 | if (m_commsPlugin != null) |
57 | { | 64 | { |
58 | while (comms.HasMessages()) | 65 | while (m_commsPlugin.HasMessages()) |
59 | { | 66 | { |
60 | ListenerInfo lInfo = (ListenerInfo)comms.GetNextMessage(); | 67 | ListenerInfo lInfo = (ListenerInfo)m_commsPlugin.GetNextMessage(); |
61 | 68 | ||
62 | //Deliver data to prim's listen handler | 69 | //Deliver data to prim's listen handler |
63 | object[] resobj = new object[] | 70 | object[] resobj = new object[] |
@@ -81,17 +88,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
81 | 88 | ||
82 | public Object[] GetSerializationData(UUID itemID) | 89 | public Object[] GetSerializationData(UUID itemID) |
83 | { | 90 | { |
84 | IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 91 | return m_commsPlugin.GetSerializationData(itemID); |
85 | |||
86 | return comms.GetSerializationData(itemID); | ||
87 | } | 92 | } |
88 | 93 | ||
89 | public void CreateFromData(uint localID, UUID itemID, UUID hostID, | 94 | public void CreateFromData(uint localID, UUID itemID, UUID hostID, |
90 | Object[] data) | 95 | Object[] data) |
91 | { | 96 | { |
92 | IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 97 | m_commsPlugin.CreateFromData(localID, itemID, hostID, data); |
93 | |||
94 | comms.CreateFromData(localID, itemID, hostID, data); | ||
95 | } | 98 | } |
96 | } | 99 | } |
97 | } | 100 | } \ No newline at end of file |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index fbb7c39..1c272f8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -44,6 +44,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
44 | 44 | ||
45 | public AsyncCommandManager m_CmdManager; | 45 | public AsyncCommandManager m_CmdManager; |
46 | 46 | ||
47 | /// <summary> | ||
48 | /// Number of sensors active. | ||
49 | /// </summary> | ||
50 | public int SensorsCount | ||
51 | { | ||
52 | get | ||
53 | { | ||
54 | lock (SenseRepeatListLock) | ||
55 | return SenseRepeaters.Count; | ||
56 | } | ||
57 | } | ||
58 | |||
47 | public SensorRepeat(AsyncCommandManager CmdManager) | 59 | public SensorRepeat(AsyncCommandManager CmdManager) |
48 | { | 60 | { |
49 | m_CmdManager = CmdManager; | 61 | m_CmdManager = CmdManager; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs index eeb59d9..bc63030 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs | |||
@@ -37,6 +37,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
37 | { | 37 | { |
38 | public AsyncCommandManager m_CmdManager; | 38 | public AsyncCommandManager m_CmdManager; |
39 | 39 | ||
40 | public int TimersCount | ||
41 | { | ||
42 | get | ||
43 | { | ||
44 | lock (TimerListLock) | ||
45 | return Timers.Count; | ||
46 | } | ||
47 | } | ||
48 | |||
40 | public Timer(AsyncCommandManager CmdManager) | 49 | public Timer(AsyncCommandManager CmdManager) |
41 | { | 50 | { |
42 | m_CmdManager = CmdManager; | 51 | m_CmdManager = CmdManager; |