diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/Application/OpenSimBase.cs | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 8499a90..b33e2c2 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -85,7 +85,7 @@ namespace OpenSim | |||
85 | 85 | ||
86 | protected string proxyUrl; | 86 | protected string proxyUrl; |
87 | protected int proxyOffset = 0; | 87 | protected int proxyOffset = 0; |
88 | 88 | ||
89 | public string userStatsURI = String.Empty; | 89 | public string userStatsURI = String.Empty; |
90 | public string managedStatsURI = String.Empty; | 90 | public string managedStatsURI = String.Empty; |
91 | 91 | ||
@@ -125,7 +125,7 @@ namespace OpenSim | |||
125 | { | 125 | { |
126 | get { return m_EnvConfigSource; } | 126 | get { return m_EnvConfigSource; } |
127 | } | 127 | } |
128 | 128 | ||
129 | public uint HttpServerPort | 129 | public uint HttpServerPort |
130 | { | 130 | { |
131 | get { return m_httpServerPort; } | 131 | get { return m_httpServerPort; } |
@@ -210,7 +210,7 @@ namespace OpenSim | |||
210 | } | 210 | } |
211 | 211 | ||
212 | /// <summary> | 212 | /// <summary> |
213 | /// Performs startup specific to the region server, including initialization of the scene | 213 | /// Performs startup specific to the region server, including initialization of the scene |
214 | /// such as loading configuration from disk. | 214 | /// such as loading configuration from disk. |
215 | /// </summary> | 215 | /// </summary> |
216 | protected override void StartupSpecific() | 216 | protected override void StartupSpecific() |
@@ -228,7 +228,7 @@ namespace OpenSim | |||
228 | string pidFile = startupConfig.GetString("PIDFile", String.Empty); | 228 | string pidFile = startupConfig.GetString("PIDFile", String.Empty); |
229 | if (pidFile != String.Empty) | 229 | if (pidFile != String.Empty) |
230 | CreatePIDFile(pidFile); | 230 | CreatePIDFile(pidFile); |
231 | 231 | ||
232 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); | 232 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); |
233 | 233 | ||
234 | m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); | 234 | m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); |
@@ -254,11 +254,11 @@ namespace OpenSim | |||
254 | if (m_simulationDataService == null) | 254 | if (m_simulationDataService == null) |
255 | throw new Exception( | 255 | throw new Exception( |
256 | string.Format( | 256 | string.Format( |
257 | "Could not load an ISimulationDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [SimulationDataStore] config section.", | 257 | "Could not load an ISimulationDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [SimulationDataStore] config section.", |
258 | module)); | 258 | module)); |
259 | 259 | ||
260 | // Load the estate data service | 260 | // Load the estate data service |
261 | module = Util.GetConfigVarFromSections<string>(Config, "LocalServiceModule", new string[]{"EstateDataStore", "EstateService"}, String.Empty); | 261 | module = Util.GetConfigVarFromSections<string>(Config, "LocalServiceModule", new string[]{"EstateDataStore", "EstateService"}, String.Empty); |
262 | if (String.IsNullOrEmpty(module)) | 262 | if (String.IsNullOrEmpty(module)) |
263 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] or [EstateService] section"); | 263 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] or [EstateService] section"); |
264 | 264 | ||
@@ -268,7 +268,7 @@ namespace OpenSim | |||
268 | if (m_estateDataService == null) | 268 | if (m_estateDataService == null) |
269 | throw new Exception( | 269 | throw new Exception( |
270 | string.Format( | 270 | string.Format( |
271 | "Could not load an IEstateDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [EstateDataStore] config section.", | 271 | "Could not load an IEstateDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [EstateDataStore] config section.", |
272 | module)); | 272 | module)); |
273 | } | 273 | } |
274 | 274 | ||
@@ -405,9 +405,9 @@ namespace OpenSim | |||
405 | // set initial ServerURI | 405 | // set initial ServerURI |
406 | regionInfo.HttpPort = m_httpServerPort; | 406 | regionInfo.HttpPort = m_httpServerPort; |
407 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/"; | 407 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/"; |
408 | 408 | ||
409 | regionInfo.osSecret = m_osSecret; | 409 | regionInfo.osSecret = m_osSecret; |
410 | 410 | ||
411 | if ((proxyUrl.Length > 0) && (portadd_flag)) | 411 | if ((proxyUrl.Length > 0) && (portadd_flag)) |
412 | { | 412 | { |
413 | // set proxy url to RegionInfo | 413 | // set proxy url to RegionInfo |
@@ -461,17 +461,17 @@ namespace OpenSim | |||
461 | 461 | ||
462 | // Prims have to be loaded after module configuration since some modules may be invoked during the load | 462 | // Prims have to be loaded after module configuration since some modules may be invoked during the load |
463 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); | 463 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); |
464 | 464 | ||
465 | // TODO : Try setting resource for region xstats here on scene | 465 | // TODO : Try setting resource for region xstats here on scene |
466 | MainServer.Instance.AddStreamHandler(new RegionStatsHandler(regionInfo)); | 466 | MainServer.Instance.AddStreamHandler(new RegionStatsHandler(regionInfo)); |
467 | 467 | ||
468 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); | 468 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); |
469 | scene.EventManager.TriggerParcelPrimCountUpdate(); | 469 | scene.EventManager.TriggerParcelPrimCountUpdate(); |
470 | 470 | ||
471 | if (scene.SnmpService != null) | 471 | if (scene.SnmpService != null) |
472 | { | 472 | { |
473 | scene.SnmpService.BootInfo("Grid Registration in progress", scene); | 473 | scene.SnmpService.BootInfo("Grid Registration in progress", scene); |
474 | } | 474 | } |
475 | 475 | ||
476 | try | 476 | try |
477 | { | 477 | { |
@@ -480,7 +480,7 @@ namespace OpenSim | |||
480 | catch (Exception e) | 480 | catch (Exception e) |
481 | { | 481 | { |
482 | m_log.ErrorFormat( | 482 | m_log.ErrorFormat( |
483 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", | 483 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", |
484 | e.Message, e.StackTrace); | 484 | e.Message, e.StackTrace); |
485 | 485 | ||
486 | if (scene.SnmpService != null) | 486 | if (scene.SnmpService != null) |
@@ -608,7 +608,7 @@ namespace OpenSim | |||
608 | 608 | ||
609 | if (rawEstateOwnerUuid == null) | 609 | if (rawEstateOwnerUuid == null) |
610 | rawEstateOwnerUuid = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString()); | 610 | rawEstateOwnerUuid = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString()); |
611 | 611 | ||
612 | UUID estateOwnerUuid = UUID.Zero; | 612 | UUID estateOwnerUuid = UUID.Zero; |
613 | if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid)) | 613 | if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid)) |
614 | { | 614 | { |
@@ -671,7 +671,7 @@ namespace OpenSim | |||
671 | scene.DeleteAllSceneObjects(); | 671 | scene.DeleteAllSceneObjects(); |
672 | SceneManager.CloseScene(scene); | 672 | SceneManager.CloseScene(scene); |
673 | //ShutdownClientServer(scene.RegionInfo); | 673 | //ShutdownClientServer(scene.RegionInfo); |
674 | 674 | ||
675 | if (!cleanup) | 675 | if (!cleanup) |
676 | return; | 676 | return; |
677 | 677 | ||
@@ -733,7 +733,7 @@ namespace OpenSim | |||
733 | SceneManager.CloseScene(scene); | 733 | SceneManager.CloseScene(scene); |
734 | //ShutdownClientServer(scene.RegionInfo); | 734 | //ShutdownClientServer(scene.RegionInfo); |
735 | } | 735 | } |
736 | 736 | ||
737 | /// <summary> | 737 | /// <summary> |
738 | /// Remove a region from the simulator without deleting it permanently. | 738 | /// Remove a region from the simulator without deleting it permanently. |
739 | /// </summary> | 739 | /// </summary> |
@@ -745,7 +745,7 @@ namespace OpenSim | |||
745 | if (SceneManager.TryGetScene(name, out target)) | 745 | if (SceneManager.TryGetScene(name, out target)) |
746 | CloseRegion(target); | 746 | CloseRegion(target); |
747 | } | 747 | } |
748 | 748 | ||
749 | /// <summary> | 749 | /// <summary> |
750 | /// Create a scene and its initial base structures. | 750 | /// Create a scene and its initial base structures. |
751 | /// </summary> | 751 | /// </summary> |
@@ -781,15 +781,15 @@ namespace OpenSim | |||
781 | IEstateDataService estateDataService, AgentCircuitManager circuitManager) | 781 | IEstateDataService estateDataService, AgentCircuitManager circuitManager) |
782 | { | 782 | { |
783 | return new Scene( | 783 | return new Scene( |
784 | regionInfo, circuitManager, | 784 | regionInfo, circuitManager, |
785 | simDataService, estateDataService, | 785 | simDataService, estateDataService, |
786 | Config, m_version); | 786 | Config, m_version); |
787 | } | 787 | } |
788 | 788 | ||
789 | protected virtual void HandleRestartRegion(RegionInfo whichRegion) | 789 | protected virtual void HandleRestartRegion(RegionInfo whichRegion) |
790 | { | 790 | { |
791 | m_log.InfoFormat( | 791 | m_log.InfoFormat( |
792 | "[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})", | 792 | "[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})", |
793 | whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY); | 793 | whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY); |
794 | 794 | ||
795 | //ShutdownClientServer(whichRegion); | 795 | //ShutdownClientServer(whichRegion); |
@@ -824,18 +824,18 @@ namespace OpenSim | |||
824 | 824 | ||
825 | /// <summary> | 825 | /// <summary> |
826 | /// Handler to supply the current extended status of this sim | 826 | /// Handler to supply the current extended status of this sim |
827 | /// Sends the statistical data in a json serialization | 827 | /// Sends the statistical data in a json serialization |
828 | /// </summary> | 828 | /// </summary> |
829 | public class XSimStatusHandler : BaseStreamHandler | 829 | public class XSimStatusHandler : BaseStreamHandler |
830 | { | 830 | { |
831 | OpenSimBase m_opensim; | 831 | OpenSimBase m_opensim; |
832 | 832 | ||
833 | public XSimStatusHandler(OpenSimBase sim) | 833 | public XSimStatusHandler(OpenSimBase sim) |
834 | : base("GET", "/" + Util.SHA1Hash(sim.osSecret), "XSimStatus", "Simulator XStatus") | 834 | : base("GET", "/" + Util.SHA1Hash(sim.osSecret), "XSimStatus", "Simulator XStatus") |
835 | { | 835 | { |
836 | m_opensim = sim; | 836 | m_opensim = sim; |
837 | } | 837 | } |
838 | 838 | ||
839 | protected override byte[] ProcessRequest(string path, Stream request, | 839 | protected override byte[] ProcessRequest(string path, Stream request, |
840 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 840 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
841 | { | 841 | { |
@@ -850,20 +850,20 @@ namespace OpenSim | |||
850 | 850 | ||
851 | /// <summary> | 851 | /// <summary> |
852 | /// Handler to supply the current extended status of this sim to a user configured URI | 852 | /// Handler to supply the current extended status of this sim to a user configured URI |
853 | /// Sends the statistical data in a json serialization | 853 | /// Sends the statistical data in a json serialization |
854 | /// If the request contains a key, "callback" the response will be wrappend in the | 854 | /// If the request contains a key, "callback" the response will be wrappend in the |
855 | /// associated value for jsonp used with ajax/javascript | 855 | /// associated value for jsonp used with ajax/javascript |
856 | /// </summary> | 856 | /// </summary> |
857 | protected class UXSimStatusHandler : BaseStreamHandler | 857 | protected class UXSimStatusHandler : BaseStreamHandler |
858 | { | 858 | { |
859 | OpenSimBase m_opensim; | 859 | OpenSimBase m_opensim; |
860 | 860 | ||
861 | public UXSimStatusHandler(OpenSimBase sim) | 861 | public UXSimStatusHandler(OpenSimBase sim) |
862 | : base("GET", "/" + sim.userStatsURI, "UXSimStatus", "Simulator UXStatus") | 862 | : base("GET", "/" + sim.userStatsURI, "UXSimStatus", "Simulator UXStatus") |
863 | { | 863 | { |
864 | m_opensim = sim; | 864 | m_opensim = sim; |
865 | } | 865 | } |
866 | 866 | ||
867 | protected override byte[] ProcessRequest(string path, Stream request, | 867 | protected override byte[] ProcessRequest(string path, Stream request, |
868 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 868 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
869 | { | 869 | { |
@@ -956,7 +956,7 @@ namespace OpenSim | |||
956 | { | 956 | { |
957 | regionnum = SceneManager.Scenes.Count; | 957 | regionnum = SceneManager.Scenes.Count; |
958 | } | 958 | } |
959 | 959 | ||
960 | /// <summary> | 960 | /// <summary> |
961 | /// Create an estate with an initial region. | 961 | /// Create an estate with an initial region. |
962 | /// </summary> | 962 | /// </summary> |
@@ -983,19 +983,19 @@ namespace OpenSim | |||
983 | MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName); | 983 | MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName); |
984 | return false; | 984 | return false; |
985 | } | 985 | } |
986 | 986 | ||
987 | regInfo.EstateSettings.EstateName = newName; | 987 | regInfo.EstateSettings.EstateName = newName; |
988 | 988 | ||
989 | // FIXME: Later on, the scene constructor will reload the estate settings no matter what. | 989 | // FIXME: Later on, the scene constructor will reload the estate settings no matter what. |
990 | // Therefore, we need to do an initial save here otherwise the new estate name will be reset | 990 | // Therefore, we need to do an initial save here otherwise the new estate name will be reset |
991 | // back to the default. The reloading of estate settings by scene could be eliminated if it | 991 | // back to the default. The reloading of estate settings by scene could be eliminated if it |
992 | // knows that the passed in settings in RegionInfo are already valid. Also, it might be | 992 | // knows that the passed in settings in RegionInfo are already valid. Also, it might be |
993 | // possible to eliminate some additional later saves made by callers of this method. | 993 | // possible to eliminate some additional later saves made by callers of this method. |
994 | EstateDataService.StoreEstateSettings(regInfo.EstateSettings); | 994 | EstateDataService.StoreEstateSettings(regInfo.EstateSettings); |
995 | 995 | ||
996 | return true; | 996 | return true; |
997 | } | 997 | } |
998 | 998 | ||
999 | /// <summary> | 999 | /// <summary> |
1000 | /// Load the estate information for the provided RegionInfo object. | 1000 | /// Load the estate information for the provided RegionInfo object. |
1001 | /// </summary> | 1001 | /// </summary> |
@@ -1009,8 +1009,8 @@ namespace OpenSim | |||
1009 | return false; // estate info in the database did not change | 1009 | return false; // estate info in the database did not change |
1010 | 1010 | ||
1011 | m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName); | 1011 | m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName); |
1012 | 1012 | ||
1013 | List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll(); | 1013 | List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll(); |
1014 | Dictionary<string, EstateSettings> estatesByName = new Dictionary<string, EstateSettings>(); | 1014 | Dictionary<string, EstateSettings> estatesByName = new Dictionary<string, EstateSettings>(); |
1015 | 1015 | ||
1016 | foreach (EstateSettings estate in estates) | 1016 | foreach (EstateSettings estate in estates) |
@@ -1103,12 +1103,12 @@ namespace OpenSim | |||
1103 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); | 1103 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); |
1104 | } | 1104 | } |
1105 | } | 1105 | } |
1106 | } | 1106 | } |
1107 | 1107 | ||
1108 | return true; // need to update the database | 1108 | return true; // need to update the database |
1109 | } | 1109 | } |
1110 | } | 1110 | } |
1111 | 1111 | ||
1112 | public class OpenSimConfigSource | 1112 | public class OpenSimConfigSource |
1113 | { | 1113 | { |
1114 | public IConfigSource Source; | 1114 | public IConfigSource Source; |