aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2012-02-24 09:56:06 +0000
committerMelanie2012-02-24 09:56:06 +0000
commit37068d17c5a6a4679f75af12cbbcfc3c78790e33 (patch)
tree42454c2fd6072b0baebb4f3d7632476de3ad18e9 /OpenSim/Region
parentPartially apply the core banlines fix (diff)
parentTake watchdog alarm calling back outside the m_threads lock. (diff)
downloadopensim-SC_OLD-37068d17c5a6a4679f75af12cbbcfc3c78790e33.zip
opensim-SC_OLD-37068d17c5a6a4679f75af12cbbcfc3c78790e33.tar.gz
opensim-SC_OLD-37068d17c5a6a4679f75af12cbbcfc3c78790e33.tar.bz2
opensim-SC_OLD-37068d17c5a6a4679f75af12cbbcfc3c78790e33.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs7
-rw-r--r--OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs30
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs2
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs32
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs5
-rw-r--r--OpenSim/Region/UserStatistics/WebStatsModule.cs3
14 files changed, 65 insertions, 34 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index a79b387..75f783b 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -244,8 +244,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
244 base.Start(m_recvBufferSize, m_asyncPacketHandling); 244 base.Start(m_recvBufferSize, m_asyncPacketHandling);
245 245
246 // Start the packet processing threads 246 // Start the packet processing threads
247 Watchdog.StartThread(IncomingPacketHandler, "Incoming Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false); 247 Watchdog.StartThread(
248 Watchdog.StartThread(OutgoingPacketHandler, "Outgoing Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false); 248 IncomingPacketHandler, "Incoming Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false, true);
249 Watchdog.StartThread(
250 OutgoingPacketHandler, "Outgoing Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false, true);
251
249 m_elapsedMSSinceLastStatReport = Environment.TickCount; 252 m_elapsedMSSinceLastStatReport = Environment.TickCount;
250 } 253 }
251 254
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
index f367739..a6e2548 100644
--- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
@@ -1210,7 +1210,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
1210 if (homeScene.TryGetScenePresence(avatarId,out avatar)) 1210 if (homeScene.TryGetScenePresence(avatarId,out avatar))
1211 { 1211 {
1212 KillAUser ku = new KillAUser(avatar,mod); 1212 KillAUser ku = new KillAUser(avatar,mod);
1213 Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true); 1213 Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true, true);
1214 } 1214 }
1215 } 1215 }
1216 1216
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 4ebfb21..548ff91 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -351,6 +351,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
351 process, 351 process,
352 string.Format("MapItemRequestThread ({0})", m_scene.RegionInfo.RegionName), 352 string.Format("MapItemRequestThread ({0})", m_scene.RegionInfo.RegionName),
353 ThreadPriority.BelowNormal, 353 ThreadPriority.BelowNormal,
354 true,
354 true); 355 true);
355 } 356 }
356 357
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index fcbed9f..108f3c8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1181,7 +1181,7 @@ namespace OpenSim.Region.Framework.Scenes
1181 1181
1182 HeartbeatThread 1182 HeartbeatThread
1183 = Watchdog.StartThread( 1183 = Watchdog.StartThread(
1184 Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false); 1184 Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false);
1185 } 1185 }
1186 1186
1187 /// <summary> 1187 /// <summary>
@@ -1219,6 +1219,13 @@ namespace OpenSim.Region.Framework.Scenes
1219 try 1219 try
1220 { 1220 {
1221 m_eventManager.TriggerOnRegionStarted(this); 1221 m_eventManager.TriggerOnRegionStarted(this);
1222
1223 // The first frame can take a very long time due to physics actors being added on startup. Therefore,
1224 // don't turn on the watchdog alarm for this thread until the second frame, in order to prevent false
1225 // alarms for scenes with many objects.
1226 Update();
1227 Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true;
1228
1222 while (!shuttingdown) 1229 while (!shuttingdown)
1223 Update(); 1230 Update();
1224 } 1231 }
@@ -1244,7 +1251,7 @@ namespace OpenSim.Region.Framework.Scenes
1244 1251
1245 ++Frame; 1252 ++Frame;
1246 1253
1247// m_log.DebugFormat("[SCENE]: Processing frame {0}", Frame); 1254// m_log.DebugFormat("[SCENE]: Processing frame {0} in {1}", Frame, RegionInfo.RegionName);
1248 1255
1249 try 1256 try
1250 { 1257 {
@@ -1406,26 +1413,10 @@ namespace OpenSim.Region.Framework.Scenes
1406 { 1413 {
1407 throw; 1414 throw;
1408 } 1415 }
1409 catch (AccessViolationException e)
1410 {
1411 m_log.ErrorFormat(
1412 "[REGION]: Failed on region {0} with exception {1}{2}",
1413 RegionInfo.RegionName, e.Message, e.StackTrace);
1414 }
1415 //catch (NullReferenceException e)
1416 //{
1417 // m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
1418 //}
1419 catch (InvalidOperationException e)
1420 {
1421 m_log.ErrorFormat(
1422 "[REGION]: Failed on region {0} with exception {1}{2}",
1423 RegionInfo.RegionName, e.Message, e.StackTrace);
1424 }
1425 catch (Exception e) 1416 catch (Exception e)
1426 { 1417 {
1427 m_log.ErrorFormat( 1418 m_log.ErrorFormat(
1428 "[REGION]: Failed on region {0} with exception {1}{2}", 1419 "[SCENE]: Failed on region {0} with exception {1}{2}",
1429 RegionInfo.RegionName, e.Message, e.StackTrace); 1420 RegionInfo.RegionName, e.Message, e.StackTrace);
1430 } 1421 }
1431 1422
@@ -1467,7 +1458,6 @@ namespace OpenSim.Region.Framework.Scenes
1467 entry.checkAtTargets(); 1458 entry.checkAtTargets();
1468 } 1459 }
1469 1460
1470
1471 /// <summary> 1461 /// <summary>
1472 /// Send out simstats data to all clients 1462 /// Send out simstats data to all clients
1473 /// </summary> 1463 /// </summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 65ffe92..b806d91 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -156,8 +156,8 @@ namespace OpenSim.Region.Framework.Scenes
156 // that the region position is cached or performance will degrade 156 // that the region position is cached or performance will degrade
157 Utils.LongToUInts(regionHandle, out x, out y); 157 Utils.LongToUInts(regionHandle, out x, out y);
158 GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); 158 GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
159 bool v = true; 159// bool v = true;
160 if (! simulatorList.Contains(dest.ServerURI)) 160 if (!simulatorList.Contains(dest.ServerURI))
161 { 161 {
162 // we havent seen this simulator before, add it to the list 162 // we havent seen this simulator before, add it to the list
163 // and send it an update 163 // and send it an update
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 7d7c5c5..0f62b2a 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
70 m_client = client; 70 m_client = client;
71 m_scene = scene; 71 m_scene = scene;
72 72
73 Watchdog.StartThread(InternalLoop, "IRCClientView", ThreadPriority.Normal, false); 73 Watchdog.StartThread(InternalLoop, "IRCClientView", ThreadPriority.Normal, false, true);
74 } 74 }
75 75
76 private void SendServerCommand(string command) 76 private void SendServerCommand(string command)
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs
index eb39026..a7c5020 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
57 57
58 m_listener.Start(50); 58 m_listener.Start(50);
59 59
60 Watchdog.StartThread(ListenLoop, "IRCServer", ThreadPriority.Normal, false); 60 Watchdog.StartThread(ListenLoop, "IRCServer", ThreadPriority.Normal, false, true);
61 m_baseScene = baseScene; 61 m_baseScene = baseScene;
62 } 62 }
63 63
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 62e3763..254d578 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -1474,6 +1474,8 @@ Console.WriteLine("CreateGeom:");
1474 /// </summary> 1474 /// </summary>
1475 private void changeadd() 1475 private void changeadd()
1476 { 1476 {
1477// m_log.DebugFormat("[ODE PRIM]: Adding prim {0}", Name);
1478
1477 int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position); 1479 int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position);
1478 IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position); 1480 IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position);
1479 1481
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 61e4934..57794f9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -137,7 +137,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
137 if (cmdHandlerThread == null) 137 if (cmdHandlerThread == null)
138 { 138 {
139 // Start the thread that will be doing the work 139 // Start the thread that will be doing the work
140 cmdHandlerThread = Watchdog.StartThread(CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true); 140 cmdHandlerThread
141 = Watchdog.StartThread(
142 CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true, true);
141 } 143 }
142 } 144 }
143 145
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index d0430f4..ba02a78 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6834,16 +6834,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6834 } 6834 }
6835 } 6835 }
6836 6836
6837 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) 6837 protected void SitTarget(SceneObjectPart part, LSL_Vector offset, LSL_Rotation rot)
6838 { 6838 {
6839 m_host.AddScriptLPS(1);
6840 // LSL quaternions can normalize to 0, normal Quaternions can't. 6839 // LSL quaternions can normalize to 0, normal Quaternions can't.
6841 if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) 6840 if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
6842 rot.z = 1; // ZERO_ROTATION = 0,0,0,1 6841 rot.z = 1; // ZERO_ROTATION = 0,0,0,1
6843 6842
6844 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); 6843 part.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
6845 m_host.SitTargetOrientation = Rot2Quaternion(rot); 6844 part.SitTargetOrientation = Rot2Quaternion(rot);
6846 m_host.ParentGroup.HasGroupChanged = true; 6845 part.ParentGroup.HasGroupChanged = true;
6846 }
6847
6848 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
6849 {
6850 m_host.AddScriptLPS(1);
6851 SitTarget(m_host, offset, rot);
6852 }
6853
6854 public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
6855 {
6856 m_host.AddScriptLPS(1);
6857 if (link == ScriptBaseClass.LINK_ROOT)
6858 SitTarget(m_host.ParentGroup.RootPart, offset, rot);
6859 else if (link == ScriptBaseClass.LINK_THIS)
6860 SitTarget(m_host, offset, rot);
6861 else
6862 {
6863 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
6864 if (null != part)
6865 {
6866 SitTarget(part, offset, rot);
6867 }
6868 }
6847 } 6869 }
6848 6870
6849 public LSL_String llAvatarOnSitTarget() 6871 public LSL_String llAvatarOnSitTarget()
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 2424130..e29ab95 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2779,7 +2779,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2779 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); 2779 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
2780 m_host.AddScriptLPS(1); 2780 m_host.AddScriptLPS(1);
2781 ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); 2781 ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
2782 avatar.SpeedModifier = (float)SpeedModifier; 2782
2783 if (avatar != null)
2784 avatar.SpeedModifier = (float)SpeedModifier;
2783 } 2785 }
2784 2786
2785 public void osKickAvatar(string FirstName,string SurName,string alert) 2787 public void osKickAvatar(string FirstName,string SurName,string alert)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 9679798..bf7e7b5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -220,6 +220,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
220 LSL_String llGetDisplayName(string id); 220 LSL_String llGetDisplayName(string id);
221 LSL_String llRequestDisplayName(string id); 221 LSL_String llRequestDisplayName(string id);
222 void llLinkParticleSystem(int linknum, LSL_List rules); 222 void llLinkParticleSystem(int linknum, LSL_List rules);
223 void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot);
223 LSL_String llList2CSV(LSL_List src); 224 LSL_String llList2CSV(LSL_List src);
224 LSL_Float llList2Float(LSL_List src, int index); 225 LSL_Float llList2Float(LSL_List src, int index);
225 LSL_Integer llList2Integer(LSL_List src, int index); 226 LSL_Integer llList2Integer(LSL_List src, int index);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index dcaa3b4..21d8432 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -1710,6 +1710,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1710 m_LSL_Functions.llSitTarget(offset, rot); 1710 m_LSL_Functions.llSitTarget(offset, rot);
1711 } 1711 }
1712 1712
1713 public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
1714 {
1715 m_LSL_Functions.llLinkSitTarget(link, offset, rot);
1716 }
1717
1713 public void llSleep(double sec) 1718 public void llSleep(double sec)
1714 { 1719 {
1715 m_LSL_Functions.llSleep(sec); 1720 m_LSL_Functions.llSleep(sec);
diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs
index f627e37..ad272f7 100644
--- a/OpenSim/Region/UserStatistics/WebStatsModule.cs
+++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs
@@ -83,6 +83,9 @@ namespace OpenSim.Region.UserStatistics
83 { 83 {
84 if (m_scenes.Count == 0) 84 if (m_scenes.Count == 0)
85 { 85 {
86 if (Util.IsWindows())
87 Util.LoadArchSpecificWindowsDll("sqlite3.dll");
88
86 //IConfig startupConfig = config.Configs["Startup"]; 89 //IConfig startupConfig = config.Configs["Startup"];
87 90
88 dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3"); 91 dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3");