diff options
Merge branch 'master' into careminster-presence-refactor
The modules will need to be updated for this to compile and run again. Please
don't use until I do the companion commit to modules later on.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/ConfigurationLoader.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 25 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 56 |
4 files changed, 47 insertions, 40 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index b860cf6..d120f03 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -225,7 +225,7 @@ namespace OpenSim | |||
225 | } | 225 | } |
226 | } | 226 | } |
227 | MainConsole.Instance = null; | 227 | MainConsole.Instance = null; |
228 | } | 228 | } |
229 | */ | 229 | */ |
230 | configSource.Alias.AddAlias("On", true); | 230 | configSource.Alias.AddAlias("On", true); |
231 | configSource.Alias.AddAlias("Off", false); | 231 | configSource.Alias.AddAlias("Off", false); |
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index e69e3fc..e2e0640 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs | |||
@@ -345,10 +345,6 @@ namespace OpenSim | |||
345 | 345 | ||
346 | m_configSettings.StorageDll = startupConfig.GetString("storage_plugin"); | 346 | m_configSettings.StorageDll = startupConfig.GetString("storage_plugin"); |
347 | 347 | ||
348 | m_configSettings.StorageConnectionString | ||
349 | = startupConfig.GetString("storage_connection_string"); | ||
350 | m_configSettings.EstateConnectionString | ||
351 | = startupConfig.GetString("estate_connection_string", m_configSettings.StorageConnectionString); | ||
352 | m_configSettings.ClientstackDll | 348 | m_configSettings.ClientstackDll |
353 | = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); | 349 | = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); |
354 | } | 350 | } |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 945da7d..6094bad 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -152,7 +152,7 @@ namespace OpenSim | |||
152 | RegisterConsoleCommands(); | 152 | RegisterConsoleCommands(); |
153 | 153 | ||
154 | base.StartupSpecific(); | 154 | base.StartupSpecific(); |
155 | 155 | ||
156 | MainServer.Instance.AddStreamHandler(new OpenSim.SimStatusHandler()); | 156 | MainServer.Instance.AddStreamHandler(new OpenSim.SimStatusHandler()); |
157 | MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this)); | 157 | MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this)); |
158 | if (userStatsURI != String.Empty) | 158 | if (userStatsURI != String.Empty) |
@@ -192,7 +192,7 @@ namespace OpenSim | |||
192 | // Hook up to the watchdog timer | 192 | // Hook up to the watchdog timer |
193 | Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler; | 193 | Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler; |
194 | 194 | ||
195 | PrintFileToConsole("startuplogo.txt"); | 195 | PrintFileToConsole("startuplogo.txt"); |
196 | 196 | ||
197 | // For now, start at the 'root' level by default | 197 | // For now, start at the 'root' level by default |
198 | if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it | 198 | if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it |
@@ -218,8 +218,8 @@ namespace OpenSim | |||
218 | 218 | ||
219 | m_console.Commands.AddCommand("region", false, "debug packet", | 219 | m_console.Commands.AddCommand("region", false, "debug packet", |
220 | "debug packet <level>", | 220 | "debug packet <level>", |
221 | "Turn on packet debugging", | 221 | "Turn on packet debugging", |
222 | "If level > 255 then all incoming and outgoing packets are logged.\n" | 222 | "If level > 255 then all incoming and outgoing packets are logged.\n" |
223 | + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" | 223 | + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" |
224 | + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" | 224 | + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" |
225 | + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" | 225 | + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" |
@@ -316,7 +316,7 @@ namespace OpenSim | |||
316 | m_console.Commands.AddCommand("region", false, "create region", | 316 | m_console.Commands.AddCommand("region", false, "create region", |
317 | "create region [\"region name\"] <region_file.ini>", | 317 | "create region [\"region name\"] <region_file.ini>", |
318 | "Create a new region.", | 318 | "Create a new region.", |
319 | "The settings for \"region name\" are read from <region_file.ini>." | 319 | "The settings for \"region name\" are read from <region_file.ini> in your Regions directory." |
320 | + " If \"region name\" does not exist in <region_file.ini>, it will be added." + Environment.NewLine | 320 | + " If \"region name\" does not exist in <region_file.ini>, it will be added." + Environment.NewLine |
321 | + "Without \"region name\", the first region found in <region_file.ini> will be created." + Environment.NewLine | 321 | + "Without \"region name\", the first region found in <region_file.ini> will be created." + Environment.NewLine |
322 | + "If <region_file.ini> does not exist, it will be created.", | 322 | + "If <region_file.ini> does not exist, it will be created.", |
@@ -552,19 +552,20 @@ namespace OpenSim | |||
552 | regionFile = Path.Combine(regionsDir, regionFile); | 552 | regionFile = Path.Combine(regionsDir, regionFile); |
553 | } | 553 | } |
554 | 554 | ||
555 | RegionInfo regInfo; | 555 | RegionInfo regInfo; |
556 | if (isXml) | 556 | if (isXml) |
557 | { | 557 | { |
558 | regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source); | 558 | regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source); |
559 | } | 559 | } |
560 | else | 560 | else |
561 | { | 561 | { |
562 | regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName); | 562 | regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName); |
563 | } | 563 | } |
564 | |||
564 | IScene scene; | 565 | IScene scene; |
565 | PopulateRegionEstateInfo(regInfo); | 566 | PopulateRegionEstateInfo(regInfo); |
566 | CreateRegion(regInfo, true, out scene); | 567 | CreateRegion(regInfo, true, out scene); |
567 | regInfo.EstateSettings.Save(); | 568 | regInfo.EstateSettings.Save(); |
568 | } | 569 | } |
569 | 570 | ||
570 | /// <summary> | 571 | /// <summary> |
@@ -942,7 +943,7 @@ namespace OpenSim | |||
942 | delegate(Scene scene) | 943 | delegate(Scene scene) |
943 | { | 944 | { |
944 | MainConsole.Instance.Output(String.Format( | 945 | MainConsole.Instance.Output(String.Format( |
945 | "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}", | 946 | "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}", |
946 | scene.RegionInfo.RegionName, | 947 | scene.RegionInfo.RegionName, |
947 | scene.RegionInfo.RegionLocX, | 948 | scene.RegionInfo.RegionLocX, |
948 | scene.RegionInfo.RegionLocY, | 949 | scene.RegionInfo.RegionLocY, |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index ec3193c..c5ee385 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -45,6 +45,7 @@ using OpenSim.Region.Framework; | |||
45 | using OpenSim.Region.Framework.Interfaces; | 45 | using OpenSim.Region.Framework.Interfaces; |
46 | using OpenSim.Region.Framework.Scenes; | 46 | using OpenSim.Region.Framework.Scenes; |
47 | using OpenSim.Region.Physics.Manager; | 47 | using OpenSim.Region.Physics.Manager; |
48 | using OpenSim.Server.Base; | ||
48 | 49 | ||
49 | namespace OpenSim | 50 | namespace OpenSim |
50 | { | 51 | { |
@@ -195,6 +196,24 @@ namespace OpenSim | |||
195 | m_permsModules = new List<string>(permissionModules.Split(',')); | 196 | m_permsModules = new List<string>(permissionModules.Split(',')); |
196 | } | 197 | } |
197 | 198 | ||
199 | // Load the simulation data service | ||
200 | IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"]; | ||
201 | if (simDataConfig == null) | ||
202 | throw new Exception("Configuration file is missing the [SimulationDataStore] section"); | ||
203 | string module = simDataConfig.GetString("LocalServiceModule", String.Empty); | ||
204 | if (String.IsNullOrEmpty(module)) | ||
205 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section"); | ||
206 | m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source }); | ||
207 | |||
208 | // Load the estate data service | ||
209 | IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"]; | ||
210 | if (estateDataConfig == null) | ||
211 | throw new Exception("Configuration file is missing the [EstateDataStore] section"); | ||
212 | module = estateDataConfig.GetString("LocalServiceModule", String.Empty); | ||
213 | if (String.IsNullOrEmpty(module)) | ||
214 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section"); | ||
215 | m_estateDataService = ServerUtils.LoadPlugin<IEstateDataService>(module, new object[] { m_config.Source }); | ||
216 | |||
198 | base.StartupSpecific(); | 217 | base.StartupSpecific(); |
199 | 218 | ||
200 | m_stats = StatsManager.StartCollectingSimExtraStats(); | 219 | m_stats = StatsManager.StartCollectingSimExtraStats(); |
@@ -612,7 +631,7 @@ namespace OpenSim | |||
612 | 631 | ||
613 | regionInfo.InternalEndPoint.Port = (int) port; | 632 | regionInfo.InternalEndPoint.Port = (int) port; |
614 | 633 | ||
615 | Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); | 634 | Scene scene = CreateScene(regionInfo, m_simulationDataService, m_estateDataService, circuitManager); |
616 | 635 | ||
617 | if (m_autoCreateClientStack) | 636 | if (m_autoCreateClientStack) |
618 | { | 637 | { |
@@ -628,30 +647,19 @@ namespace OpenSim | |||
628 | return scene; | 647 | return scene; |
629 | } | 648 | } |
630 | 649 | ||
631 | protected override StorageManager CreateStorageManager() | ||
632 | { | ||
633 | return | ||
634 | CreateStorageManager(m_configSettings.StorageConnectionString, m_configSettings.EstateConnectionString); | ||
635 | } | ||
636 | |||
637 | protected StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring) | ||
638 | { | ||
639 | return new StorageManager(m_configSettings.StorageDll, connectionstring, estateconnectionstring); | ||
640 | } | ||
641 | |||
642 | protected override ClientStackManager CreateClientStackManager() | 650 | protected override ClientStackManager CreateClientStackManager() |
643 | { | 651 | { |
644 | return new ClientStackManager(m_configSettings.ClientstackDll); | 652 | return new ClientStackManager(m_configSettings.ClientstackDll); |
645 | } | 653 | } |
646 | 654 | ||
647 | protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, | 655 | protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, |
648 | AgentCircuitManager circuitManager) | 656 | IEstateDataService estateDataService, AgentCircuitManager circuitManager) |
649 | { | 657 | { |
650 | SceneCommunicationService sceneGridService = new SceneCommunicationService(); | 658 | SceneCommunicationService sceneGridService = new SceneCommunicationService(); |
651 | 659 | ||
652 | return new Scene( | 660 | return new Scene( |
653 | regionInfo, circuitManager, sceneGridService, | 661 | regionInfo, circuitManager, sceneGridService, |
654 | storageManager, m_moduleLoader, false, m_configSettings.PhysicalPrim, | 662 | simDataService, estateDataService, m_moduleLoader, false, m_configSettings.PhysicalPrim, |
655 | m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); | 663 | m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); |
656 | } | 664 | } |
657 | 665 | ||
@@ -868,21 +876,23 @@ namespace OpenSim | |||
868 | /// </param> | 876 | /// </param> |
869 | public void PopulateRegionEstateInfo(RegionInfo regInfo) | 877 | public void PopulateRegionEstateInfo(RegionInfo regInfo) |
870 | { | 878 | { |
871 | if (m_storageManager.EstateDataStore != null) | 879 | IEstateDataService estateDataService = EstateDataService; |
880 | |||
881 | if (estateDataService != null) | ||
872 | { | 882 | { |
873 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, false); | 883 | regInfo.EstateSettings = estateDataService.LoadEstateSettings(regInfo.RegionID, false); |
874 | } | 884 | } |
875 | 885 | ||
876 | if (regInfo.EstateSettings.EstateID == 0) // No record at all | 886 | if (regInfo.EstateSettings.EstateID == 0) // No record at all |
877 | { | 887 | { |
878 | MainConsole.Instance.Output("Your region is not part of an estate."); | 888 | MainConsole.Instance.Output("Your region is not part of an estate."); |
879 | while (true) | 889 | while (true) |
880 | { | 890 | { |
881 | string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() {"yes", "no"}); | 891 | string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() { "yes", "no" }); |
882 | if (response == "no") | 892 | if (response == "no") |
883 | { | 893 | { |
884 | // Create a new estate | 894 | // Create a new estate |
885 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, true); | 895 | regInfo.EstateSettings = estateDataService.LoadEstateSettings(regInfo.RegionID, true); |
886 | 896 | ||
887 | regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName); | 897 | regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName); |
888 | //regInfo.EstateSettings.Save(); | 898 | //regInfo.EstateSettings.Save(); |
@@ -894,7 +904,7 @@ namespace OpenSim | |||
894 | if (response == "None") | 904 | if (response == "None") |
895 | continue; | 905 | continue; |
896 | 906 | ||
897 | List<int> estateIDs = m_storageManager.EstateDataStore.GetEstates(response); | 907 | List<int> estateIDs = estateDataService.GetEstates(response); |
898 | if (estateIDs.Count < 1) | 908 | if (estateIDs.Count < 1) |
899 | { | 909 | { |
900 | MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again"); | 910 | MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again"); |
@@ -903,9 +913,9 @@ namespace OpenSim | |||
903 | 913 | ||
904 | int estateID = estateIDs[0]; | 914 | int estateID = estateIDs[0]; |
905 | 915 | ||
906 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(estateID); | 916 | regInfo.EstateSettings = estateDataService.LoadEstateSettings(estateID); |
907 | 917 | ||
908 | if (m_storageManager.EstateDataStore.LinkRegion(regInfo.RegionID, estateID)) | 918 | if (estateDataService.LinkRegion(regInfo.RegionID, estateID)) |
909 | break; | 919 | break; |
910 | 920 | ||
911 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); | 921 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); |