aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase
diff options
context:
space:
mode:
authorJeff Ames2008-02-20 18:38:20 +0000
committerJeff Ames2008-02-20 18:38:20 +0000
commita8cfbbe963529728acbab4d9936cb89af380d1ac (patch)
tree16a72fba3d15556f6702127e7cfb98aa9fb9cf81 /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase
parentFix exception when reading OpenSim.ini file. (diff)
downloadopensim-SC_OLD-a8cfbbe963529728acbab4d9936cb89af380d1ac.zip
opensim-SC_OLD-a8cfbbe963529728acbab4d9936cb89af380d1ac.tar.gz
opensim-SC_OLD-a8cfbbe963529728acbab4d9936cb89af380d1ac.tar.bz2
opensim-SC_OLD-a8cfbbe963529728acbab4d9936cb89af380d1ac.tar.xz
Minor cleanup.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs2
9 files changed, 19 insertions, 35 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs
index 0fb8d75..23dec6a 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs
@@ -13,7 +13,7 @@
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
@@ -121,7 +121,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
121 121
122 // Console.WriteLine("Scripts loaded in this Appdomain: " + currentAD.ScriptsLoaded); 122 // Console.WriteLine("Scripts loaded in this Appdomain: " + currentAD.ScriptsLoaded);
123 return currentAD; 123 return currentAD;
124 } // lock 124 }
125 } 125 }
126 126
127 private int AppDomainNameCount; 127 private int AppDomainNameCount;
@@ -184,8 +184,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
184#endif 184#endif
185 } 185 }
186 } 186 }
187 } // foreach 187 }
188 } // lock 188 }
189 } 189 }
190 190
191 public IScript LoadScript(string FileName) 191 public IScript LoadScript(string FileName)
@@ -235,8 +235,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
235 ads.ScriptsWaitingUnload++; 235 ads.ScriptsWaitingUnload++;
236 break; 236 break;
237 } 237 }
238 } // foreach 238 }
239 } // lock 239 }
240 240
241 UnloadAppDomains(); // Outsite lock, has its own GetLock 241 UnloadAppDomains(); // Outsite lock, has its own GetLock
242 } 242 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs
index 830ca99..48c6525 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs
@@ -13,7 +13,7 @@
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
@@ -64,7 +64,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
64 cmdHandlerThreadCycleSleepms = m_ScriptEngine.ScriptConfigSource.GetInt("AsyncLLCommandLoopms", 50); 64 cmdHandlerThreadCycleSleepms = m_ScriptEngine.ScriptConfigSource.GetInt("AsyncLLCommandLoopms", 50);
65 } 65 }
66 66
67
68 ~AsyncLSLCommandManager() 67 ~AsyncLSLCommandManager()
69 { 68 {
70 // Shut down thread 69 // Shut down thread
@@ -215,7 +214,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
215 // Time has passed? 214 // Time has passed?
216 if (ts.next < DateTime.Now.Ticks) 215 if (ts.next < DateTime.Now.Ticks)
217 { 216 {
218
219 Console.WriteLine("Time has passed: Now: " + DateTime.Now.Ticks + ", Passed: " + ts.next); 217 Console.WriteLine("Time has passed: Now: " + DateTime.Now.Ticks + ", Passed: " + ts.next);
220 // Add it to queue 218 // Add it to queue
221 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", EventQueueManager.llDetectNull, 219 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", EventQueueManager.llDetectNull,
@@ -226,7 +224,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
226 ts.next = DateTime.Now.Ticks + ts.interval; 224 ts.next = DateTime.Now.Ticks + ts.interval;
227 } 225 }
228 } 226 }
229 } // lock 227 }
230 } 228 }
231 229
232 #endregion 230 #endregion
@@ -272,7 +270,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
272 } 270 }
273 271
274 httpInfo = iHttpReq.GetNextCompletedRequest(); 272 httpInfo = iHttpReq.GetNextCompletedRequest();
275
276 } 273 }
277 } 274 }
278 275
@@ -307,11 +304,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
307 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 304 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
308 rInfo.GetLocalID(), rInfo.GetItemID(), "remote_data", EventQueueManager.llDetectNull, resobj 305 rInfo.GetLocalID(), rInfo.GetItemID(), "remote_data", EventQueueManager.llDetectNull, resobj
309 ); 306 );
310
311 } 307 }
312 308
313 rInfo = xmlrpc.GetNextCompletedRequest(); 309 rInfo = xmlrpc.GetNextCompletedRequest();
314
315 } 310 }
316 311
317 SendRemoteDataRequest srdInfo = xmlrpc.GetNextCompletedSRDRequest(); 312 SendRemoteDataRequest srdInfo = xmlrpc.GetNextCompletedSRDRequest();
@@ -332,14 +327,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
332 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 327 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
333 srdInfo.m_localID, srdInfo.m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj 328 srdInfo.m_localID, srdInfo.m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj
334 ); 329 );
335
336 } 330 }
337 331
338 srdInfo = xmlrpc.GetNextCompletedSRDRequest(); 332 srdInfo = xmlrpc.GetNextCompletedSRDRequest();
339
340 } 333 }
341
342
343 } 334 }
344 } 335 }
345 336
@@ -372,7 +363,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
372 lInfo.GetLocalID(), lInfo.GetItemID(), "listen", EventQueueManager.llDetectNull, resobj 363 lInfo.GetLocalID(), lInfo.GetItemID(), "listen", EventQueueManager.llDetectNull, resobj
373 ); 364 );
374 } 365 }
375
376 } 366 }
377 } 367 }
378 } 368 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs
index e99f0a7..82789b2 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs
@@ -13,7 +13,7 @@
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
index 607a4ff..b091e04 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
@@ -13,7 +13,7 @@
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
index 5e06fcd..267cf52 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
@@ -13,7 +13,7 @@
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
index aa607d8..d4db935 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
@@ -219,8 +219,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
219 GotItem = true; 219 GotItem = true;
220 break; 220 break;
221 } 221 }
222 } // go through queue 222 }
223 } // lock 223 }
224 224
225 if (GotItem == true) 225 if (GotItem == true)
226 { 226 {
@@ -305,7 +305,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
305 eventQueueManager.ReleaseLock(QIS.localID); 305 eventQueueManager.ReleaseLock(QIS.localID);
306 } 306 }
307 } 307 }
308 } // Something in queue 308 }
309 } 309 }
310 } 310 }
311 catch (ThreadAbortException tae) 311 catch (ThreadAbortException tae)
@@ -316,8 +316,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
316 { 316 {
317 eventQueueManager.m_ScriptEngine.Log.Error("[" + ScriptEngineName + "]: Exception in EventQueueThreadLoop: " + e.ToString()); 317 eventQueueManager.m_ScriptEngine.Log.Error("[" + ScriptEngineName + "]: Exception in EventQueueThreadLoop: " + e.ToString());
318 } 318 }
319 } // while 319 }
320 } // try 320 }
321 catch (ThreadAbortException) 321 catch (ThreadAbortException)
322 { 322 {
323 //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Worker thread killed: " + tae.Message); 323 //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Worker thread killed: " + tae.Message);
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
index ab4ea04..47446a3 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
@@ -130,9 +130,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
130 130
131 if (m_ScriptEngine != null) 131 if (m_ScriptEngine != null)
132 { 132 {
133 //
134 // Re-reading config every x seconds 133 // Re-reading config every x seconds
135 //
136 if (m_ScriptEngine.RefreshConfigFilens > 0) 134 if (m_ScriptEngine.RefreshConfigFilens > 0)
137 { 135 {
138 // Check if its time to re-read config 136 // Check if its time to re-read config
@@ -145,15 +143,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
145 } 143 }
146 } 144 }
147 145
148 //
149 // Adjust number of running script threads if not correct 146 // Adjust number of running script threads if not correct
150 //
151 if (m_ScriptEngine.m_EventQueueManager != null) 147 if (m_ScriptEngine.m_EventQueueManager != null)
152 m_ScriptEngine.m_EventQueueManager.AdjustNumberOfScriptThreads(); 148 m_ScriptEngine.m_EventQueueManager.AdjustNumberOfScriptThreads();
153 149
154 //
155 // Check if any script has exceeded its max execution time 150 // Check if any script has exceeded its max execution time
156 //
157 if (m_ScriptEngine.m_EventQueueManager != null && m_ScriptEngine.m_EventQueueManager.EnforceMaxExecutionTime) 151 if (m_ScriptEngine.m_EventQueueManager != null && m_ScriptEngine.m_EventQueueManager.EnforceMaxExecutionTime)
158 { 152 {
159 // We are enforcing execution time 153 // We are enforcing execution time
@@ -165,7 +159,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
165 Last_maxFunctionExecutionTimens = DateTime.Now.Ticks; // Reset time 159 Last_maxFunctionExecutionTimens = DateTime.Now.Ticks; // Reset time
166 } 160 }
167 } 161 }
168 } // m_ScriptEngine != null 162 }
169 } 163 }
170 } 164 }
171 catch (Exception ex) 165 catch (Exception ex)
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
index dab5845..3777b67 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
@@ -13,7 +13,7 @@
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
index d47cab8..43ff4ac 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
@@ -13,7 +13,7 @@
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY