diff options
Diffstat (limited to '')
4 files changed, 117 insertions, 15 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index b239965..ee38306 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | |||
@@ -1,4 +1,32 @@ | |||
1 | using System; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using System; | ||
2 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
3 | using System.Text; | 31 | using System.Text; |
4 | using System.Threading; | 32 | using System.Threading; |
@@ -42,7 +70,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
42 | Stop(); | 70 | Stop(); |
43 | } | 71 | } |
44 | 72 | ||
45 | |||
46 | public void ReadConfig() | 73 | public void ReadConfig() |
47 | { | 74 | { |
48 | ScriptEngineName = eventQueueManager.m_ScriptEngine.ScriptEngineName; | 75 | ScriptEngineName = eventQueueManager.m_ScriptEngine.ScriptEngineName; |
@@ -77,16 +104,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
77 | if (EventQueueThread != null) | 104 | if (EventQueueThread != null) |
78 | if (EventQueueThread.IsAlive) | 105 | if (EventQueueThread.IsAlive) |
79 | EventQueueThread.Priority = MyThreadPriority; | 106 | EventQueueThread.Priority = MyThreadPriority; |
80 | |||
81 | } | 107 | } |
82 | 108 | ||
83 | |||
84 | /// <summary> | 109 | /// <summary> |
85 | /// Start thread | 110 | /// Start thread |
86 | /// </summary> | 111 | /// </summary> |
87 | private void Start() | 112 | private void Start() |
88 | { | 113 | { |
89 | |||
90 | EventQueueThread = new Thread(EventQueueThreadLoop); | 114 | EventQueueThread = new Thread(EventQueueThreadLoop); |
91 | EventQueueThread.IsBackground = true; | 115 | EventQueueThread.IsBackground = true; |
92 | 116 | ||
@@ -118,7 +142,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
118 | } | 142 | } |
119 | } | 143 | } |
120 | 144 | ||
121 | |||
122 | /// <summary> | 145 | /// <summary> |
123 | /// Queue processing thread loop | 146 | /// Queue processing thread loop |
124 | /// </summary> | 147 | /// </summary> |
@@ -157,7 +180,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
157 | } | 180 | } |
158 | } | 181 | } |
159 | 182 | ||
160 | |||
161 | //try | 183 | //try |
162 | // { | 184 | // { |
163 | EventQueueManager.QueueItemStruct QIS = BlankQIS; | 185 | EventQueueManager.QueueItemStruct QIS = BlankQIS; |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index 57e56d4..4a119f0 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | |||
@@ -1,4 +1,32 @@ | |||
1 | using System; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using System; | ||
2 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
3 | using System.Text; | 31 | using System.Text; |
4 | using System.Threading; | 32 | using System.Threading; |
@@ -33,7 +61,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
33 | MaintenanceLoopms = m_ScriptEngine.ScriptConfigSource.GetInt("MaintenanceLoopms", 50); | 61 | MaintenanceLoopms = m_ScriptEngine.ScriptConfigSource.GetInt("MaintenanceLoopms", 50); |
34 | } | 62 | } |
35 | 63 | ||
36 | |||
37 | #region " Maintenance thread " | 64 | #region " Maintenance thread " |
38 | /// <summary> | 65 | /// <summary> |
39 | /// Maintenance thread. Enforcing max execution time for example. | 66 | /// Maintenance thread. Enforcing max execution time for example. |
@@ -78,7 +105,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
78 | { | 105 | { |
79 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "Exception stopping maintenence thread: " + ex.ToString()); | 106 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "Exception stopping maintenence thread: " + ex.ToString()); |
80 | } | 107 | } |
81 | |||
82 | } | 108 | } |
83 | 109 | ||
84 | /// <summary> | 110 | /// <summary> |
@@ -150,6 +176,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
150 | } | 176 | } |
151 | } | 177 | } |
152 | #endregion | 178 | #endregion |
179 | |||
153 | /// <summary> | 180 | /// <summary> |
154 | /// If set to true then threads and stuff should try to make a graceful exit | 181 | /// If set to true then threads and stuff should try to make a graceful exit |
155 | /// </summary> | 182 | /// </summary> |
@@ -159,6 +186,5 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
159 | set { _PleaseShutdown = value; } | 186 | set { _PleaseShutdown = value; } |
160 | } | 187 | } |
161 | private bool _PleaseShutdown = false; | 188 | private bool _PleaseShutdown = false; |
162 | |||
163 | } | 189 | } |
164 | } | 190 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs index ded85b3..1c730f5 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs | |||
@@ -1,4 +1,32 @@ | |||
1 | using System; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using System; | ||
2 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
3 | using System.Text; | 31 | using System.Text; |
4 | 32 | ||
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs index 38eb9b9..6adfa4e 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs | |||
@@ -1,4 +1,32 @@ | |||
1 | using System; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using System; | ||
2 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
3 | using System.Text; | 31 | using System.Text; |
4 | using System.Runtime.Remoting; | 32 | using System.Runtime.Remoting; |
@@ -26,7 +54,6 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
26 | 54 | ||
27 | try | 55 | try |
28 | { | 56 | { |
29 | |||
30 | // Create an instance of the remote object | 57 | // Create an instance of the remote object |
31 | ScriptServerInterfaces.ServerRemotingObject obj = (ScriptServerInterfaces.ServerRemotingObject)Activator.GetObject( | 58 | ScriptServerInterfaces.ServerRemotingObject obj = (ScriptServerInterfaces.ServerRemotingObject)Activator.GetObject( |
32 | typeof(ScriptServerInterfaces.ServerRemotingObject), | 59 | typeof(ScriptServerInterfaces.ServerRemotingObject), |
@@ -51,7 +78,6 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
51 | System.Console.WriteLine("Error: unable to connect to server"); | 78 | System.Console.WriteLine("Error: unable to connect to server"); |
52 | } | 79 | } |
53 | return null; | 80 | return null; |
54 | |||
55 | } | 81 | } |
56 | } | 82 | } |
57 | } | 83 | } |