aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2012-03-20 02:48:11 +0000
committerMelanie2012-03-20 02:48:11 +0000
commit5768a151ffca0ac34d14cab59d70dc5223e531db (patch)
tree6b1eedd67fca3ea6c1ad1c9d3e6128e0e07bcea2 /OpenSim/Region
parentRemove debug output using Console.WriteLine and trim excessive whitespace (diff)
parentRemove pointless ThreadAbortException catching in a test that isn't run anyway. (diff)
downloadopensim-SC_OLD-5768a151ffca0ac34d14cab59d70dc5223e531db.zip
opensim-SC_OLD-5768a151ffca0ac34d14cab59d70dc5223e531db.tar.gz
opensim-SC_OLD-5768a151ffca0ac34d14cab59d70dc5223e531db.tar.bz2
opensim-SC_OLD-5768a151ffca0ac34d14cab59d70dc5223e531db.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Data/MySQL/MySQLXAssetData.cs
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs16
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs26
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs8
6 files changed, 34 insertions, 39 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
index c982db6..267fb9e 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
@@ -93,8 +93,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
93 93
94 scene.RegisterModuleInterface<IAuthorizationService>(this); 94 scene.RegisterModuleInterface<IAuthorizationService>(this);
95 m_Scene = scene; 95 m_Scene = scene;
96
97 scene.EventManager.OnLoginsEnabled += new EventManager.LoginsEnabled(OnLoginsEnabled);
98 } 96 }
99 97
100 public void RemoveRegion(Scene scene) 98 public void RemoveRegion(Scene scene)
@@ -106,16 +104,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
106 if (!m_Enabled) 104 if (!m_Enabled)
107 return; 105 return;
108 106
107 m_AuthorizationService = new AuthorizationService(m_AuthorizationConfig, m_Scene);
108
109 m_log.InfoFormat( 109 m_log.InfoFormat(
110 "[AUTHORIZATION CONNECTOR]: Enabled local authorization for region {0}", 110 "[AUTHORIZATION CONNECTOR]: Enabled local authorization for region {0}",
111 scene.RegionInfo.RegionName); 111 scene.RegionInfo.RegionName);
112 } 112 }
113 113
114 private void OnLoginsEnabled(string regionName)
115 {
116 m_AuthorizationService = new AuthorizationService(m_AuthorizationConfig, m_Scene);
117 }
118
119 public bool IsAuthorizedForRegion( 114 public bool IsAuthorizedForRegion(
120 string userID, string firstName, string lastName, string regionID, out string message) 115 string userID, string firstName, string lastName, string regionID, out string message)
121 { 116 {
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 605ee32..853491b 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -485,6 +485,13 @@ namespace OpenSim.Region.Framework.Scenes
485 public event RegionHeartbeatEnd OnRegionHeartbeatEnd; 485 public event RegionHeartbeatEnd OnRegionHeartbeatEnd;
486 486
487 public delegate void LoginsEnabled(string regionName); 487 public delegate void LoginsEnabled(string regionName);
488
489 /// <summary>
490 /// This should only fire in all circumstances if the RegionReady module is active.
491 /// </summary>
492 /// <remarks>
493 /// TODO: Fire this even when the RegionReady module is not active.
494 /// </remarks>
488 public event LoginsEnabled OnLoginsEnabled; 495 public event LoginsEnabled OnLoginsEnabled;
489 496
490 public delegate void PrimsLoaded(Scene s); 497 public delegate void PrimsLoaded(Scene s);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 753effc..b50ccc4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1229,9 +1229,6 @@ namespace OpenSim.Region.Framework.Scenes
1229 while (!shuttingdown) 1229 while (!shuttingdown)
1230 Update(); 1230 Update();
1231 } 1231 }
1232 catch (ThreadAbortException)
1233 {
1234 }
1235 finally 1232 finally
1236 { 1233 {
1237 Monitor.Pulse(m_heartbeatLock); 1234 Monitor.Pulse(m_heartbeatLock);
@@ -1409,10 +1406,6 @@ namespace OpenSim.Region.Framework.Scenes
1409 } 1406 }
1410 } 1407 }
1411 } 1408 }
1412 catch (NotImplementedException)
1413 {
1414 throw;
1415 }
1416 catch (Exception e) 1409 catch (Exception e)
1417 { 1410 {
1418 m_log.ErrorFormat( 1411 m_log.ErrorFormat(
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index c5a76b2..bebc10c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -63,17 +63,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
63 63
64 Thread testThread = new Thread(testClass.run); 64 Thread testThread = new Thread(testClass.run);
65 65
66 try 66 // Seems kind of redundant to start a thread and then join it, however.. We need to protect against
67 { 67 // A thread abort exception in the simulator code.
68 // Seems kind of redundant to start a thread and then join it, however.. We need to protect against 68 testThread.Start();
69 // A thread abort exception in the simulator code. 69 testThread.Join();
70 testThread.Start(); 70
71 testThread.Join();
72 }
73 catch (ThreadAbortException)
74 {
75
76 }
77 Assert.That(testClass.results.Result, Is.EqualTo(true), testClass.results.Message); 71 Assert.That(testClass.results.Result, Is.EqualTo(true), testClass.results.Message);
78 // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); 72 // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
79 } 73 }
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 254d578..6f37347 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -842,17 +842,23 @@ namespace OpenSim.Region.Physics.OdePlugin
842 mesh.getIndexListAsPtrToIntArray(out indices, out triStride, out indexCount); // Also fixed, needs release after usage 842 mesh.getIndexListAsPtrToIntArray(out indices, out triStride, out indexCount); // Also fixed, needs release after usage
843 843
844 mesh.releaseSourceMeshData(); // free up the original mesh data to save memory 844 mesh.releaseSourceMeshData(); // free up the original mesh data to save memory
845 if (m_MeshToTriMeshMap.ContainsKey(mesh))
846 {
847 _triMeshData = m_MeshToTriMeshMap[mesh];
848 }
849 else
850 {
851 _triMeshData = d.GeomTriMeshDataCreate();
852 845
853 d.GeomTriMeshDataBuildSimple(_triMeshData, vertices, vertexStride, vertexCount, indices, indexCount, triStride); 846 // We must lock here since m_MeshToTriMeshMap is static and multiple scene threads may call this method at
854 d.GeomTriMeshDataPreprocess(_triMeshData); 847 // the same time.
855 m_MeshToTriMeshMap[mesh] = _triMeshData; 848 lock (m_MeshToTriMeshMap)
849 {
850 if (m_MeshToTriMeshMap.ContainsKey(mesh))
851 {
852 _triMeshData = m_MeshToTriMeshMap[mesh];
853 }
854 else
855 {
856 _triMeshData = d.GeomTriMeshDataCreate();
857
858 d.GeomTriMeshDataBuildSimple(_triMeshData, vertices, vertexStride, vertexCount, indices, indexCount, triStride);
859 d.GeomTriMeshDataPreprocess(_triMeshData);
860 m_MeshToTriMeshMap[mesh] = _triMeshData;
861 }
856 } 862 }
857 863
858// _parent_scene.waitForSpaceUnlock(m_targetSpace); 864// _parent_scene.waitForSpaceUnlock(m_targetSpace);
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index eb10975..1e0f01f 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -469,16 +469,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine
469// sb.AppendFormat("Assemblies loaded : {0}\n", m_Assemblies.Count); 469// sb.AppendFormat("Assemblies loaded : {0}\n", m_Assemblies.Count);
470 470
471 SensorRepeat sr = AsyncCommandManager.GetSensorRepeatPlugin(this); 471 SensorRepeat sr = AsyncCommandManager.GetSensorRepeatPlugin(this);
472 sb.AppendFormat("Sensors : {0}\n", sr.SensorsCount); 472 sb.AppendFormat("Sensors : {0}\n", sr != null ? sr.SensorsCount : 0);
473 473
474 Dataserver ds = AsyncCommandManager.GetDataserverPlugin(this); 474 Dataserver ds = AsyncCommandManager.GetDataserverPlugin(this);
475 sb.AppendFormat("Dataserver requests : {0}\n", ds.DataserverRequestsCount); 475 sb.AppendFormat("Dataserver requests : {0}\n", ds != null ? ds.DataserverRequestsCount : 0);
476 476
477 Timer t = AsyncCommandManager.GetTimerPlugin(this); 477 Timer t = AsyncCommandManager.GetTimerPlugin(this);
478 sb.AppendFormat("Timers : {0}\n", t.TimersCount); 478 sb.AppendFormat("Timers : {0}\n", t != null ? t.TimersCount : 0);
479 479
480 Listener l = AsyncCommandManager.GetListenerPlugin(this); 480 Listener l = AsyncCommandManager.GetListenerPlugin(this);
481 sb.AppendFormat("Listeners : {0}\n", l.ListenerCount); 481 sb.AppendFormat("Listeners : {0}\n", l != null ? l.ListenerCount : 0);
482 482
483 return sb.ToString(); 483 return sb.ToString();
484 } 484 }