aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs7
-rw-r--r--OpenSim/Services/GridService/GridService.cs29
-rw-r--r--bin/config-include/Grid.ini5
3 files changed, 23 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
index d5fca71..38fa890 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
@@ -94,15 +94,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
94 94
95 private void InitialiseService(IConfigSource source) 95 private void InitialiseService(IConfigSource source)
96 { 96 {
97 IConfig assetConfig = source.Configs["GridService"]; 97 IConfig config = source.Configs["GridService"];
98 if (assetConfig == null) 98 if (config == null)
99 { 99 {
100 m_log.Error("[LOCAL GRID SERVICE CONNECTOR]: GridService missing from OpenSim.ini"); 100 m_log.Error("[LOCAL GRID SERVICE CONNECTOR]: GridService missing from OpenSim.ini");
101 return; 101 return;
102 } 102 }
103 103
104 string serviceDll = assetConfig.GetString("LocalServiceModule", 104 string serviceDll = config.GetString("LocalServiceModule", String.Empty);
105 String.Empty);
106 105
107 if (serviceDll == String.Empty) 106 if (serviceDll == String.Empty)
108 { 107 {
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index aa19fc7..2836236 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -64,6 +64,9 @@ namespace OpenSim.Services.GridService
64 64
65 m_config = config; 65 m_config = config;
66 IConfig gridConfig = config.Configs["GridService"]; 66 IConfig gridConfig = config.Configs["GridService"];
67
68 bool suppressConsoleCommands = false;
69
67 if (gridConfig != null) 70 if (gridConfig != null)
68 { 71 {
69 m_DeleteOnUnregister = gridConfig.GetBoolean("DeleteOnUnregister", true); 72 m_DeleteOnUnregister = gridConfig.GetBoolean("DeleteOnUnregister", true);
@@ -77,13 +80,17 @@ namespace OpenSim.Services.GridService
77 } 80 }
78 m_AllowDuplicateNames = gridConfig.GetBoolean("AllowDuplicateNames", m_AllowDuplicateNames); 81 m_AllowDuplicateNames = gridConfig.GetBoolean("AllowDuplicateNames", m_AllowDuplicateNames);
79 m_AllowHypergridMapSearch = gridConfig.GetBoolean("AllowHypergridMapSearch", m_AllowHypergridMapSearch); 82 m_AllowHypergridMapSearch = gridConfig.GetBoolean("AllowHypergridMapSearch", m_AllowHypergridMapSearch);
83
84 // This service is also used locally by a simulator running in grid mode. This switches prevents
85 // inappropriate console commands from being registered
86 suppressConsoleCommands = gridConfig.GetBoolean("SuppressConsoleCommands", suppressConsoleCommands);
80 } 87 }
81 88
82 if (m_RootInstance == null) 89 if (m_RootInstance == null)
83 { 90 {
84 m_RootInstance = this; 91 m_RootInstance = this;
85 92
86 if (MainConsole.Instance != null) 93 if (!suppressConsoleCommands && MainConsole.Instance != null)
87 { 94 {
88 MainConsole.Instance.Commands.AddCommand("Regions", true, 95 MainConsole.Instance.Commands.AddCommand("Regions", true,
89 "deregister region id", 96 "deregister region id",
@@ -92,17 +99,12 @@ namespace OpenSim.Services.GridService
92 String.Empty, 99 String.Empty,
93 HandleDeregisterRegion); 100 HandleDeregisterRegion);
94 101
95 // A messy way of stopping this command being added if we are in standalone (since the simulator 102 MainConsole.Instance.Commands.AddCommand("Regions", true,
96 // has an identically named command 103 "show regions",
97 // 104 "show regions",
98 // XXX: We're relying on the OpenSimulator version being registered first, which is not well defined. 105 "Show details on all regions",
99 if (!MainConsole.Instance.Commands.HasCommand("show regions")) 106 String.Empty,
100 MainConsole.Instance.Commands.AddCommand("Regions", true, 107 HandleShowRegions);
101 "show regions",
102 "show regions",
103 "Show details on all regions",
104 String.Empty,
105 HandleShowRegions);
106 108
107 MainConsole.Instance.Commands.AddCommand("Regions", true, 109 MainConsole.Instance.Commands.AddCommand("Regions", true,
108 "show region name", 110 "show region name",
@@ -132,6 +134,7 @@ namespace OpenSim.Services.GridService
132 String.Empty, 134 String.Empty,
133 HandleSetFlags); 135 HandleSetFlags);
134 } 136 }
137
135 m_HypergridLinker = new HypergridLinker(m_config, this, m_Database); 138 m_HypergridLinker = new HypergridLinker(m_config, this, m_Database);
136 } 139 }
137 } 140 }
diff --git a/bin/config-include/Grid.ini b/bin/config-include/Grid.ini
index 419b40d..e9eaee3 100644
--- a/bin/config-include/Grid.ini
+++ b/bin/config-include/Grid.ini
@@ -55,8 +55,11 @@
55 LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" 55 LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
56 ; for the LocalGridServicesConnector which is used by the Remote one 56 ; for the LocalGridServicesConnector which is used by the Remote one
57 StorageProvider = "OpenSim.Data.Null.dll:NullRegionData" 57 StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
58
59 NetworkConnector = "OpenSim.Services.Connectors.dll:GridServicesConnector" 58 NetworkConnector = "OpenSim.Services.Connectors.dll:GridServicesConnector"
59
60 ; Because LocalGridServicesConnector starts this service, in grid mode we need to suppress
61 ; the inappropriate console commands that it registers.
62 SuppressConsoleCommands = true
60 63
61[LibraryService] 64[LibraryService]
62 LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService" 65 LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"