diff options
author | Justin Clark-Casey (justincc) | 2012-06-29 00:03:22 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-06-29 00:03:22 +0100 |
commit | f202c36106815949e56c58612770a00c65ab80a3 (patch) | |
tree | 12affb429b04b2d2abd7b3a804b9d71cd647a4e7 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Change AttachmentsModule.DetachSingleAttachmentToInv() to accept a SOG direct... (diff) | |
download | opensim-SC-f202c36106815949e56c58612770a00c65ab80a3.zip opensim-SC-f202c36106815949e56c58612770a00c65ab80a3.tar.gz opensim-SC-f202c36106815949e56c58612770a00c65ab80a3.tar.bz2 opensim-SC-f202c36106815949e56c58612770a00c65ab80a3.tar.xz |
Add IScene.Name for code clarity to replace the RegionInfo.RegionName used in many, many log messages.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d449116..c28979e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -614,8 +614,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
614 | m_sceneGridService = sceneGridService; | 614 | m_sceneGridService = sceneGridService; |
615 | m_SimulationDataService = simDataService; | 615 | m_SimulationDataService = simDataService; |
616 | m_EstateDataService = estateDataService; | 616 | m_EstateDataService = estateDataService; |
617 | m_regionHandle = m_regInfo.RegionHandle; | 617 | m_regionHandle = RegionInfo.RegionHandle; |
618 | m_regionName = m_regInfo.RegionName; | ||
619 | 618 | ||
620 | m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this); | 619 | m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this); |
621 | m_asyncSceneObjectDeleter.Enabled = true; | 620 | m_asyncSceneObjectDeleter.Enabled = true; |
@@ -630,7 +629,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
630 | // resave. | 629 | // resave. |
631 | // FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new | 630 | // FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new |
632 | // region is set up and avoid these gyrations. | 631 | // region is set up and avoid these gyrations. |
633 | RegionSettings rs = simDataService.LoadRegionSettings(m_regInfo.RegionID); | 632 | RegionSettings rs = simDataService.LoadRegionSettings(RegionInfo.RegionID); |
634 | bool updatedTerrainTextures = false; | 633 | bool updatedTerrainTextures = false; |
635 | if (rs.TerrainTexture1 == UUID.Zero) | 634 | if (rs.TerrainTexture1 == UUID.Zero) |
636 | { | 635 | { |
@@ -659,10 +658,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
659 | if (updatedTerrainTextures) | 658 | if (updatedTerrainTextures) |
660 | rs.Save(); | 659 | rs.Save(); |
661 | 660 | ||
662 | m_regInfo.RegionSettings = rs; | 661 | RegionInfo.RegionSettings = rs; |
663 | 662 | ||
664 | if (estateDataService != null) | 663 | if (estateDataService != null) |
665 | m_regInfo.EstateSettings = estateDataService.LoadEstateSettings(m_regInfo.RegionID, false); | 664 | RegionInfo.EstateSettings = estateDataService.LoadEstateSettings(RegionInfo.RegionID, false); |
666 | 665 | ||
667 | #endregion Region Settings | 666 | #endregion Region Settings |
668 | 667 | ||
@@ -828,7 +827,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
828 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | 827 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; |
829 | } | 828 | } |
830 | 829 | ||
831 | public Scene(RegionInfo regInfo) | 830 | public Scene(RegionInfo regInfo) : base(regInfo) |
832 | { | 831 | { |
833 | PhysicalPrims = true; | 832 | PhysicalPrims = true; |
834 | CollidablePrims = true; | 833 | CollidablePrims = true; |
@@ -855,7 +854,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
855 | WestBorders.Add(westBorder); | 854 | WestBorders.Add(westBorder); |
856 | BordersLocked = false; | 855 | BordersLocked = false; |
857 | 856 | ||
858 | m_regInfo = regInfo; | ||
859 | m_eventManager = new EventManager(); | 857 | m_eventManager = new EventManager(); |
860 | 858 | ||
861 | m_permissions = new ScenePermissions(this); | 859 | m_permissions = new ScenePermissions(this); |
@@ -1199,8 +1197,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1199 | 1197 | ||
1200 | m_sceneGraph.Close(); | 1198 | m_sceneGraph.Close(); |
1201 | 1199 | ||
1202 | if (!GridService.DeregisterRegion(m_regInfo.RegionID)) | 1200 | if (!GridService.DeregisterRegion(RegionInfo.RegionID)) |
1203 | m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName); | 1201 | m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name); |
1204 | 1202 | ||
1205 | // call the base class Close method. | 1203 | // call the base class Close method. |
1206 | base.Close(); | 1204 | base.Close(); |
@@ -1720,14 +1718,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1720 | 1718 | ||
1721 | public void StoreWindlightProfile(RegionLightShareData wl) | 1719 | public void StoreWindlightProfile(RegionLightShareData wl) |
1722 | { | 1720 | { |
1723 | m_regInfo.WindlightSettings = wl; | 1721 | RegionInfo.WindlightSettings = wl; |
1724 | SimulationDataService.StoreRegionWindlightSettings(wl); | 1722 | SimulationDataService.StoreRegionWindlightSettings(wl); |
1725 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | 1723 | m_eventManager.TriggerOnSaveNewWindlightProfile(); |
1726 | } | 1724 | } |
1727 | 1725 | ||
1728 | public void LoadWindlightProfile() | 1726 | public void LoadWindlightProfile() |
1729 | { | 1727 | { |
1730 | m_regInfo.WindlightSettings = SimulationDataService.LoadRegionWindlightSettings(RegionInfo.RegionID); | 1728 | RegionInfo.WindlightSettings = SimulationDataService.LoadRegionWindlightSettings(RegionInfo.RegionID); |
1731 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | 1729 | m_eventManager.TriggerOnSaveNewWindlightProfile(); |
1732 | } | 1730 | } |
1733 | 1731 | ||
@@ -2218,7 +2216,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2218 | ForceSceneObjectBackup(so); | 2216 | ForceSceneObjectBackup(so); |
2219 | 2217 | ||
2220 | so.DetachFromBackup(); | 2218 | so.DetachFromBackup(); |
2221 | SimulationDataService.RemoveObject(so.UUID, m_regInfo.RegionID); | 2219 | SimulationDataService.RemoveObject(so.UUID, RegionInfo.RegionID); |
2222 | } | 2220 | } |
2223 | 2221 | ||
2224 | // We need to keep track of this state in case this group is still queued for further backup. | 2222 | // We need to keep track of this state in case this group is still queued for further backup. |
@@ -2553,7 +2551,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2553 | // If the user is banned, we won't let any of their objects | 2551 | // If the user is banned, we won't let any of their objects |
2554 | // enter. Period. | 2552 | // enter. Period. |
2555 | // | 2553 | // |
2556 | if (m_regInfo.EstateSettings.IsBanned(sceneObject.OwnerID)) | 2554 | if (RegionInfo.EstateSettings.IsBanned(sceneObject.OwnerID)) |
2557 | { | 2555 | { |
2558 | m_log.InfoFormat("[INTERREGION]: Denied prim crossing for banned avatar {0}", sceneObject.OwnerID); | 2556 | m_log.InfoFormat("[INTERREGION]: Denied prim crossing for banned avatar {0}", sceneObject.OwnerID); |
2559 | 2557 | ||
@@ -3734,9 +3732,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3734 | } | 3732 | } |
3735 | } | 3733 | } |
3736 | 3734 | ||
3737 | if (m_regInfo.EstateSettings != null) | 3735 | if (RegionInfo.EstateSettings != null) |
3738 | { | 3736 | { |
3739 | if (m_regInfo.EstateSettings.IsBanned(agent.AgentID)) | 3737 | if (RegionInfo.EstateSettings.IsBanned(agent.AgentID)) |
3740 | { | 3738 | { |
3741 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist", | 3739 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist", |
3742 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); | 3740 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); |
@@ -3768,7 +3766,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3768 | } | 3766 | } |
3769 | 3767 | ||
3770 | bool groupAccess = false; | 3768 | bool groupAccess = false; |
3771 | UUID[] estateGroups = m_regInfo.EstateSettings.EstateGroups; | 3769 | UUID[] estateGroups = RegionInfo.EstateSettings.EstateGroups; |
3772 | 3770 | ||
3773 | if (estateGroups != null) | 3771 | if (estateGroups != null) |
3774 | { | 3772 | { |
@@ -3786,8 +3784,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3786 | m_log.ErrorFormat("[CONNECTION BEGIN]: EstateGroups is null!"); | 3784 | m_log.ErrorFormat("[CONNECTION BEGIN]: EstateGroups is null!"); |
3787 | } | 3785 | } |
3788 | 3786 | ||
3789 | if (!m_regInfo.EstateSettings.PublicAccess && | 3787 | if (!RegionInfo.EstateSettings.PublicAccess && |
3790 | !m_regInfo.EstateSettings.HasAccess(agent.AgentID) && | 3788 | !RegionInfo.EstateSettings.HasAccess(agent.AgentID) && |
3791 | !groupAccess) | 3789 | !groupAccess) |
3792 | { | 3790 | { |
3793 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate", | 3791 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate", |
@@ -3860,7 +3858,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3860 | // if (loggingOffUser != null) | 3858 | // if (loggingOffUser != null) |
3861 | // { | 3859 | // { |
3862 | // UUID localRegionSecret = UUID.Zero; | 3860 | // UUID localRegionSecret = UUID.Zero; |
3863 | // bool parsedsecret = UUID.TryParse(m_regInfo.regionSecret, out localRegionSecret); | 3861 | // bool parsedsecret = UUID.TryParse(RegionInfo.regionSecret, out localRegionSecret); |
3864 | // | 3862 | // |
3865 | // // Region Secret is used here in case a new sessionid overwrites an old one on the user server. | 3863 | // // Region Secret is used here in case a new sessionid overwrites an old one on the user server. |
3866 | // // Will update the user server in a few revisions to use it. | 3864 | // // Will update the user server in a few revisions to use it. |
@@ -4079,13 +4077,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
4079 | ScenePresence sp = GetScenePresence(remoteClient.AgentId); | 4077 | ScenePresence sp = GetScenePresence(remoteClient.AgentId); |
4080 | if (sp != null) | 4078 | if (sp != null) |
4081 | { | 4079 | { |
4082 | uint regionX = m_regInfo.RegionLocX; | 4080 | uint regionX = RegionInfo.RegionLocX; |
4083 | uint regionY = m_regInfo.RegionLocY; | 4081 | uint regionY = RegionInfo.RegionLocY; |
4084 | 4082 | ||
4085 | Utils.LongToUInts(regionHandle, out regionX, out regionY); | 4083 | Utils.LongToUInts(regionHandle, out regionX, out regionY); |
4086 | 4084 | ||
4087 | int shiftx = (int) regionX - (int) m_regInfo.RegionLocX * (int)Constants.RegionSize; | 4085 | int shiftx = (int) regionX - (int) RegionInfo.RegionLocX * (int)Constants.RegionSize; |
4088 | int shifty = (int) regionY - (int) m_regInfo.RegionLocY * (int)Constants.RegionSize; | 4086 | int shifty = (int) regionY - (int) RegionInfo.RegionLocY * (int)Constants.RegionSize; |
4089 | 4087 | ||
4090 | position.X += shiftx; | 4088 | position.X += shiftx; |
4091 | position.Y += shifty; | 4089 | position.Y += shifty; |
@@ -4108,7 +4106,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4108 | 4106 | ||
4109 | if (!result) | 4107 | if (!result) |
4110 | { | 4108 | { |
4111 | regionHandle = m_regInfo.RegionHandle; | 4109 | regionHandle = RegionInfo.RegionHandle; |
4112 | } | 4110 | } |
4113 | else | 4111 | else |
4114 | { | 4112 | { |
@@ -4614,7 +4612,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4614 | 4612 | ||
4615 | public void DeleteFromStorage(UUID uuid) | 4613 | public void DeleteFromStorage(UUID uuid) |
4616 | { | 4614 | { |
4617 | SimulationDataService.RemoveObject(uuid, m_regInfo.RegionID); | 4615 | SimulationDataService.RemoveObject(uuid, RegionInfo.RegionID); |
4618 | } | 4616 | } |
4619 | 4617 | ||
4620 | public int GetHealth() | 4618 | public int GetHealth() |
@@ -5039,7 +5037,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5039 | IEstateDataService estateDataService = EstateDataService; | 5037 | IEstateDataService estateDataService = EstateDataService; |
5040 | if (estateDataService != null) | 5038 | if (estateDataService != null) |
5041 | { | 5039 | { |
5042 | m_regInfo.EstateSettings = estateDataService.LoadEstateSettings(m_regInfo.RegionID, false); | 5040 | RegionInfo.EstateSettings = estateDataService.LoadEstateSettings(RegionInfo.RegionID, false); |
5043 | TriggerEstateSunUpdate(); | 5041 | TriggerEstateSunUpdate(); |
5044 | } | 5042 | } |
5045 | } | 5043 | } |