diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 90c022f743..78eab3dd2b 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -102,50 +102,45 @@ namespace OpenSim.Services.GridService public HypergridLinker(IConfigSource config, GridService gridService, IRegionData db) { - IConfig modulesConfig = config.Configs["Modules"]; - if (modulesConfig == null) - return; + IConfig gridConfig = config.Configs["GridService"]; + if (gridConfig == null) + return; - if (modulesConfig.GetString("HypergridLinker", "") != "HypergridLinker") - return; - - m_log.DebugFormat("[HYPERGRID LINKER]: Starting with db {0}", db.GetType()); + if (!gridConfig.GetBoolean("HypergridLinker", false)) + return; m_Database = db; m_GridService = gridService; + m_log.DebugFormat("[HYPERGRID LINKER]: Starting with db {0}", db.GetType()); - IConfig gridConfig = config.Configs["GridService"]; - if (gridConfig != null) - { - string assetService = gridConfig.GetString("AssetService", string.Empty); + string assetService = gridConfig.GetString("AssetService", string.Empty); - Object[] args = new Object[] { config }; + Object[] args = new Object[] { config }; - if (assetService != string.Empty) - m_AssetService = ServerUtils.LoadPlugin(assetService, args); + if (assetService != string.Empty) + m_AssetService = ServerUtils.LoadPlugin(assetService, args); - string scope = gridConfig.GetString("ScopeID", string.Empty); - if (scope != string.Empty) - UUID.TryParse(scope, out m_ScopeID); + string scope = gridConfig.GetString("ScopeID", string.Empty); + if (scope != string.Empty) + UUID.TryParse(scope, out m_ScopeID); // m_Check4096 = gridConfig.GetBoolean("Check4096", true); - m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); + m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); - m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", string.Empty); - try - { - m_ThisGatekeeperURI = new Uri(m_ThisGatekeeper); - } - catch - { - m_log.WarnFormat("[HYPERGRID LINKER]: Malformed URL in [GridService], variable Gatekeeper = {0}", m_ThisGatekeeper); - } - - m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService); - - m_log.Debug("[HYPERGRID LINKER]: Loaded all services..."); + m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", string.Empty); + try + { + m_ThisGatekeeperURI = new Uri(m_ThisGatekeeper); } + catch + { + m_log.WarnFormat("[HYPERGRID LINKER]: Malformed URL in [GridService], variable Gatekeeper = {0}", m_ThisGatekeeper); + } + + m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService); + + m_log.Debug("[HYPERGRID LINKER]: Loaded all services..."); if (!string.IsNullOrEmpty(m_MapTileDirectory)) { diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index eee7dc894c..49ee41a5b6 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -82,6 +82,8 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 ; * [GridService] LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" + HypergridLinker = true + ; Realm = "regions" ; AllowDuplicateNames = "True" diff --git a/bin/config-include/GridHypergrid.ini b/bin/config-include/GridHypergrid.ini index 4c3249816c..5f0ba370e1 100644 --- a/bin/config-include/GridHypergrid.ini +++ b/bin/config-include/GridHypergrid.ini @@ -26,7 +26,6 @@ LandServices = "RemoteLandServicesConnector" FriendsModule = "HGFriendsModule" MapImageService = "MapImageServiceModule" - HypergridLinker = "HypergridLinker" LandServiceInConnector = true NeighbourServiceInConnector = true @@ -60,6 +59,7 @@ ; Needed to display non-default map tile images for linked regions AssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" + HypergridLinker = true AllowHypergridMapSearch = true [LibraryService] diff --git a/bin/config-include/HyperSimianGrid.ini b/bin/config-include/HyperSimianGrid.ini index ec4efc0274..99a589c74c 100644 --- a/bin/config-include/HyperSimianGrid.ini +++ b/bin/config-include/HyperSimianGrid.ini @@ -40,7 +40,6 @@ LibraryModule = false AssetCaching = "FlotsamAssetCache" - HypergridLinker = "HypergridLinker" [SimulationDataStore] LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" @@ -56,6 +55,7 @@ StorageProvider = "OpenSim.Data.Null.dll:NullRegionData" NetworkConnector = "OpenSim.Services.Connectors.dll:SimianGridServiceConnector" + HypergridLinker = true AllowHypergridMapSearch = true [LibraryService] diff --git a/bin/config-include/StandaloneHypergrid.ini b/bin/config-include/StandaloneHypergrid.ini index f8c258a8a3..00beb31f10 100644 --- a/bin/config-include/StandaloneHypergrid.ini +++ b/bin/config-include/StandaloneHypergrid.ini @@ -22,7 +22,6 @@ EntityTransferModule = "HGEntityTransferModule" InventoryAccessModule = "HGInventoryAccessModule" FriendsModule = "HGFriendsModule" - HypergridLinker = "HypergridLinker" InventoryServiceInConnector = true AssetServiceInConnector = true @@ -84,6 +83,7 @@ ; Needed to display non-default map tile images for remote regions AssetService = "OpenSim.Services.AssetService.dll:AssetService" + HypergridLinker = true AllowHypergridMapSearch = true [PresenceService]