From 0d08f81421abda3a1de0e2ade6633e86a2735da5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 21 Feb 2013 19:07:39 -0800 Subject: [PATCH 1/7] Err.. wrong dll name for groups in Robust.HG.ini.example --- bin/Robust.HG.ini.example | 2 +- bin/Robust.ini.example | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 274132e4ff..445020faf4 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -80,7 +80,7 @@ InstantMessageServerConnector = "8002/OpenSim.Server.Handlers.dll:InstantMessage HGInventoryServiceConnector = "HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector" HGAssetServiceConnector = "HGAssetService@8002/OpenSim.Server.Handlers.dll:AssetServiceConnector" ;; Uncomment this if you want Groups V2, HG to work -; HGGroupsServiceConnector = "8002/Diva.Groups.dll:HGGroupsServiceRobustConnector" +; HGGroupsServiceConnector = "8002/OpenSim.Addons.Groups.dll:HGGroupsServiceRobustConnector" ;; Additions for other add-on modules. For example: ;; WifiServerConnector = "8002/Diva.Wifi.dll:WifiServerConnector" diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index ecbed1fcba..bb98bbf4c3 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example @@ -381,3 +381,5 @@ MapGetServiceConnector = "8002/OpenSim.Server.Handlers.dll:MapGetServiceConnecto ; password help: optional: page providing password assistance for users of your grid ;password = http://127.0.0.1/password + + From ccb7cce8190f50024ebf25369d95e7267376f28b Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 22 Feb 2013 21:59:00 +0000 Subject: [PATCH 2/7] Make reset of EntityTransferStateMachine for an avatar transfer always happen despite unexpected exceptions. This means that if such an exception does occur, the region does not need to be reset before that user can teleport from it again. This is all Oren's code from his patch in http://opensimulator.org/mantis/view.php?id=6374 but I've chosen to split it in two. --- .../EntityTransfer/EntityTransferModule.cs | 123 ++++++++++++------ 1 file changed, 81 insertions(+), 42 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 3cb1901494..07c36660e8 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -179,13 +179,24 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer if (!sp.Scene.Permissions.CanTeleport(sp.UUID)) return; - // Reset animations; the viewer does that in teleports. - sp.Animator.ResetAnimations(); - string destinationRegionName = "(not found)"; + // Record that this agent is in transit so that we can prevent simultaneous requests and do later detection + // of whether the destination region completes the teleport. + if (!m_entityTransferStateMachine.SetInTransit(sp.UUID)) + { + m_log.DebugFormat( + "[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2}@{3} - agent is already in transit.", + sp.Name, sp.UUID, position, regionHandle); + + return; + } + try { + // Reset animations; the viewer does that in teleports. + sp.Animator.ResetAnimations(); + if (regionHandle == sp.Scene.RegionInfo.RegionHandle) { destinationRegionName = sp.Scene.RegionInfo.RegionName; @@ -194,12 +205,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } else // Another region possibly in another simulator { - GridRegion finalDestination; - TeleportAgentToDifferentRegion( - sp, regionHandle, position, lookAt, teleportFlags, out finalDestination); - - if (finalDestination != null) - destinationRegionName = finalDestination.RegionName; + GridRegion finalDestination = null; + try + { + TeleportAgentToDifferentRegion( + sp, regionHandle, position, lookAt, teleportFlags, out finalDestination); + } + finally + { + if (finalDestination != null) + destinationRegionName = finalDestination.RegionName; + } } } catch (Exception e) @@ -209,11 +225,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer sp.Name, sp.AbsolutePosition, sp.Scene.RegionInfo.RegionName, position, destinationRegionName, e.Message, e.StackTrace); - // Make sure that we clear the in-transit flag so that future teleport attempts don't always fail. - m_entityTransferStateMachine.ResetFromTransit(sp.UUID); - sp.ControllingClient.SendTeleportFailed("Internal error"); } + finally + { + m_entityTransferStateMachine.ResetFromTransit(sp.UUID); + } } /// @@ -229,15 +246,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer "[ENTITY TRANSFER MODULE]: Teleport for {0} to {1} within {2}", sp.Name, position, sp.Scene.RegionInfo.RegionName); - if (!m_entityTransferStateMachine.SetInTransit(sp.UUID)) - { - m_log.DebugFormat( - "[ENTITY TRANSFER MODULE]: Ignoring within region teleport request of {0} {1} to {2} - agent is already in transit.", - sp.Name, sp.UUID, position); - - return; - } - // Teleport within the same region if (IsOutsideRegion(sp.Scene, position) || position.Z < 0) { @@ -282,7 +290,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); - m_entityTransferStateMachine.ResetFromTransit(sp.UUID); } /// @@ -336,7 +343,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // // This is it // - DoTeleport(sp, reg, finalDestination, position, lookAt, teleportFlags); + DoTeleportInternal(sp, reg, finalDestination, position, lookAt, teleportFlags); // // // @@ -391,6 +398,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer && Math.Abs(sourceRegion.RegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance; } + /// + /// Wraps DoTeleportInternal() and manages the transfer state. + /// public void DoTeleport( ScenePresence sp, GridRegion reg, GridRegion finalDestination, Vector3 position, Vector3 lookAt, uint teleportFlags) @@ -405,12 +415,37 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return; } + + try + { + DoTeleportInternal(sp, reg, finalDestination, position, lookAt, teleportFlags); + } + catch (Exception e) + { + m_log.ErrorFormat( + "[ENTITY TRANSFER MODULE]: Exception on teleport of {0} from {1}@{2} to {3}@{4}: {5}{6}", + sp.Name, sp.AbsolutePosition, sp.Scene.RegionInfo.RegionName, position, finalDestination.RegionName, + e.Message, e.StackTrace); + sp.ControllingClient.SendTeleportFailed("Internal error"); + } + finally + { + m_entityTransferStateMachine.ResetFromTransit(sp.UUID); + } + } + + /// + /// Teleports the agent to another region. + /// This method doesn't manage the transfer state; the caller must do that. + /// + private void DoTeleportInternal( + ScenePresence sp, GridRegion reg, GridRegion finalDestination, + Vector3 position, Vector3 lookAt, uint teleportFlags) + { if (reg == null || finalDestination == null) { sp.ControllingClient.SendTeleportFailed("Unable to locate destination"); - m_entityTransferStateMachine.ResetFromTransit(sp.UUID); - return; } @@ -430,8 +465,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer sourceRegion.RegionName, sourceRegion.RegionLocX, sourceRegion.RegionLocY, MaxTransferDistance)); - m_entityTransferStateMachine.ResetFromTransit(sp.UUID); - return; } @@ -450,7 +483,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer if (endPoint.Address == null) { sp.ControllingClient.SendTeleportFailed("Remote Region appears to be down"); - m_entityTransferStateMachine.ResetFromTransit(sp.UUID); return; } @@ -472,7 +504,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer finalDestination, sp.ControllingClient.AgentId, Vector3.Zero, out version, out reason)) { sp.ControllingClient.SendTeleportFailed(reason); - m_entityTransferStateMachine.ResetFromTransit(sp.UUID); m_log.DebugFormat( "[ENTITY TRANSFER MODULE]: {0} was stopped from teleporting from {1} to {2} because {3}", @@ -528,7 +559,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, out reason, out logout)) { sp.ControllingClient.SendTeleportFailed(String.Format("Teleport refused: {0}", reason)); - m_entityTransferStateMachine.ResetFromTransit(sp.UUID); m_log.DebugFormat( "[ENTITY TRANSFER MODULE]: Teleport of {0} from {1} to {2} was refused because {3}", @@ -629,7 +659,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); - Fail(sp, finalDestination, logout); + Fail(sp, finalDestination, logout); return; } @@ -682,8 +712,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // "[ENTITY TRANSFER MODULE]: User {0} is going to another region, profile cache removed", // sp.UUID); // } - - m_entityTransferStateMachine.ResetFromTransit(sp.UUID); } protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout) @@ -703,8 +731,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer Scene.SimulationService.CloseAgent(finalDestination, sp.UUID); sp.Scene.EventManager.TriggerTeleportFail(sp.ControllingClient, logout); - - m_entityTransferStateMachine.ResetFromTransit(sp.UUID); } protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) @@ -1133,16 +1159,24 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer if (neighbourRegion == null) return agent; + if (!m_entityTransferStateMachine.SetInTransit(agent.UUID)) + { + m_log.ErrorFormat( + "[ENTITY TRANSFER MODULE]: Problem crossing user {0} to new region {1} from {2} - agent is already in transit", + agent.Name, neighbourRegion.RegionName, agent.Scene.RegionInfo.RegionName); + return agent; + } + + bool transitWasReset = false; + try { - m_entityTransferStateMachine.SetInTransit(agent.UUID); - ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); - + m_log.DebugFormat( "[ENTITY TRANSFER MODULE]: Crossing agent {0} {1} to {2}-{3} running version {4}", agent.Firstname, agent.Lastname, neighbourx, neighboury, version); - + Scene m_scene = agent.Scene; if (!agent.ValidateAttachments()) @@ -1155,7 +1189,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer agent.RemoveFromPhysicalScene(); - AgentData cAgent = new AgentData(); + AgentData cAgent = new AgentData(); agent.CopyTo(cAgent); cAgent.Position = pos; if (isFlying) @@ -1174,7 +1208,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer ReInstantiateScripts(agent); agent.AddToPhysicalScene(isFlying); - m_entityTransferStateMachine.ResetFromTransit(agent.UUID); return agent; } @@ -1222,6 +1255,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // FIXME: Possibly this should occur lower down after other commands to close other agents, // but not sure yet what the side effects would be. m_entityTransferStateMachine.ResetFromTransit(agent.UUID); + transitWasReset = true; // now we have a child agent in this region. Request all interesting data about other (root) agents agent.SendOtherAgentsAvatarDataToMe(); @@ -1261,6 +1295,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // TODO: Might be worth attempting other restoration here such as reinstantiation of scripts, etc. } + finally + { + if (!transitWasReset) + m_entityTransferStateMachine.ResetFromTransit(agent.UUID); + } return agent; } @@ -2083,4 +2122,4 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer #endregion } -} \ No newline at end of file +} From a93f06eb88489f822d903249377ce8cbdd991fb0 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 22 Feb 2013 23:08:14 +0000 Subject: [PATCH 3/7] minor: Add doc to ScenePresence.IsInTransit to make it clear that this is set only for region crossing and not teleport, etc. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 9c1d2b645f..39a885cfe1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -657,6 +657,12 @@ namespace OpenSim.Region.Framework.Scenes private bool m_inTransit; + /// + /// This signals whether the presence is in transit between neighbouring regions. + /// + /// + /// It is not set when the presence is teleporting or logging in/out directly to a region. + /// public bool IsInTransit { get { return m_inTransit; } From 0e8289cd002b1947e172d1bfc77fdd0b16d92ffb Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 22 Feb 2013 15:57:33 -0800 Subject: [PATCH 4/7] Added new Util function for reading config vars that's more generic than the one I added yesterday -- this is for helping move config vars out of [Startup] --- .../HGGroupsServiceRobustConnector.cs | 2 +- OpenSim/Framework/Util.cs | 38 +++++++++++++++++++ .../CoreModules/Avatar/Lure/HGLureModule.cs | 2 +- .../HGInventoryAccessModule.cs | 7 ++-- .../DataSnapshot/DataSnapshotManager.cs | 2 +- .../Shared/Api/Implementation/OSSL_Api.cs | 4 +- .../Server/Handlers/Grid/GridInfoHandlers.cs | 2 +- .../Services/GridService/HypergridLinker.cs | 2 +- .../HypergridService/GatekeeperService.cs | 2 +- .../HypergridService/HGInventoryService.cs | 2 +- .../HGSuitcaseInventoryService.cs | 2 +- .../HypergridService/UserAgentService.cs | 2 +- .../Services/LLLoginService/LLLoginService.cs | 2 +- 13 files changed, 54 insertions(+), 15 deletions(-) diff --git a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs index 0e71c72ad6..7cc9ff4044 100644 --- a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs +++ b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs @@ -65,7 +65,7 @@ namespace OpenSim.Groups m_log.DebugFormat("[Groups.RobustHGConnector]: Starting with config name {0}", m_ConfigName); - string homeURI = Util.GetConfigVarWithDefaultSection(config, "HomeURI", m_ConfigName); //cnf.GetString("HomeURI", string.Empty); + string homeURI = Util.GetConfigVarFromSections(config, "HomeURI", new string[] { "Startup", m_ConfigName} ); //cnf.GetString("HomeURI", string.Empty); if (homeURI == string.Empty) throw new Exception(String.Format("[Groups.RobustHGConnector]: please provide the HomeURI [Startup] or in section {0}", m_ConfigName)); diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 1700d3eb97..8b8e50756d 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -904,6 +904,44 @@ namespace OpenSim.Framework return val; } + + /// + /// Gets the value of a configuration variable by looking into + /// multiple sections in order. The latter sections overwrite + /// any values previously found. + /// + /// Type of the variable + /// The configuration object + /// The configuration variable + /// Ordered sequence of sections to look at + /// + public static T GetConfigVarFromSections(IConfigSource config, string varname, string[] sections) + { + object val = default(T); + foreach (string section in sections) + { + IConfig cnf = config.Configs[section]; + if (cnf == null) + continue; + + if (typeof(T) == typeof(String)) + { + if (val == null) // no null strings, please + val = string.Empty; + val = cnf.GetString(varname, (string)val); + } + else if (typeof(T) == typeof(Boolean)) + val = cnf.GetBoolean(varname, (bool)val); + else if (typeof(T) == typeof(Int32)) + val = cnf.GetInt(varname, (int)val); + else if (typeof(T) == typeof(float)) + val = cnf.GetFloat(varname, (int)val); + else + m_log.WarnFormat("[UTIL]: Unhandled type {0}", typeof(T)); + } + return (T)val; + } + #endregion public static float Clip(float x, float min, float max) diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs index 784a78862f..22cdc8086f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs @@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure { m_Enabled = true; - m_ThisGridURL = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "Messaging"); + m_ThisGridURL = Util.GetConfigVarFromSections(config, "GatekeeperURI", new string[] {"Startup", "Messaging"}); // Legacy. Remove soon! m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL); m_log.DebugFormat("[LURE MODULE]: {0} enabled", Name); diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index c439ea811f..4f6b92e288 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -88,11 +88,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"]; if (thisModuleConfig != null) { - m_HomeURI = Util.GetConfigVarWithDefaultSection(source, "HomeURI", "HGInventoryAccessModule"); - m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true); - m_ThisGatekeeper = Util.GetConfigVarWithDefaultSection(source, "GatekeeperURI", "HGInventoryAccessModule"); + m_HomeURI = Util.GetConfigVarFromSections(source, "HomeURI", new string[] {"Startup", "HGInventoryAccessModule"}); + m_ThisGatekeeper = Util.GetConfigVarFromSections(source, "GatekeeperURI", new string[] {"Startup", "HGInventoryAccessModule"}); // Legacy. Renove soon! m_ThisGatekeeper = thisModuleConfig.GetString("Gatekeeper", m_ThisGatekeeper); + + m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true); m_RestrictInventoryAccessAbroad = thisModuleConfig.GetBoolean("RestrictInventoryAccessAbroad", true); } else diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 13d9d31b35..e8bf1943ed 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs @@ -113,7 +113,7 @@ namespace OpenSim.Region.DataSnapshot try { m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled); - string gatekeeper = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "GridService"); + string gatekeeper = Util.GetConfigVarFromSections(config, "GatekeeperURI", new string[] {"Startup", "GridService"}); // Legacy. Remove soon! if (string.IsNullOrEmpty(gatekeeper)) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 0334169ab1..d356f8c2c9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -2138,7 +2138,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); IConfigSource config = m_ScriptEngine.ConfigSource; - string HomeURI = Util.GetConfigVarWithDefaultSection(config, "HomeURI", string.Empty); + string HomeURI = Util.GetConfigVarFromSections(config, "HomeURI", new string[]{"Startup"}); if (!string.IsNullOrEmpty(HomeURI)) return HomeURI; @@ -2159,7 +2159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); IConfigSource config = m_ScriptEngine.ConfigSource; - string gatekeeperURI = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", string.Empty); + string gatekeeperURI = Util.GetConfigVarFromSections(config, "GatekeeperURI", new string[] {"Startup"}); if (!string.IsNullOrEmpty(gatekeeperURI)) return gatekeeperURI; diff --git a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs index 35f86c5acf..d85aab07fe 100644 --- a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs +++ b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs @@ -177,7 +177,7 @@ namespace OpenSim.Server.Handlers.Grid map[k] = OSD.FromString(_info[k].ToString()); } - string HomeURI = Util.GetConfigVarWithDefaultSection(m_Config, "HomeURI", string.Empty); + string HomeURI = Util.GetConfigVarFromSections(m_Config, "HomeURI", new string[] {"Startup"}); if (!String.IsNullOrEmpty(HomeURI)) map["home"] = OSD.FromString(HomeURI); diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 3e7c556f46..80575ee4b4 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -128,7 +128,7 @@ namespace OpenSim.Services.GridService m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); - m_ThisGatekeeper = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "GridService"); + m_ThisGatekeeper = Util.GetConfigVarFromSections(config, "GatekeeperURI", new string[] {"Startup", "GridService"}); // Legacy. Remove soon! m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", m_ThisGatekeeper); try diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 21f363c3a8..c41d95284c 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -96,7 +96,7 @@ namespace OpenSim.Services.HypergridService UUID.TryParse(scope, out m_ScopeID); //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true); - m_ExternalName = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "GatekeeperService"); + m_ExternalName = Util.GetConfigVarFromSections(config, "GatekeeperURI", new string[] {"Startup", "GatekeeperService"}); m_ExternalName = serverConfig.GetString("ExternalName", m_ExternalName); if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/")) m_ExternalName = m_ExternalName + "/"; diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs index a9661f41a8..17e83ccd3b 100644 --- a/OpenSim/Services/HypergridService/HGInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGInventoryService.cs @@ -81,7 +81,7 @@ namespace OpenSim.Services.HypergridService if (m_UserAccountService == null) throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); - m_HomeURL = Util.GetConfigVarWithDefaultSection(config, "HomeURI", m_ConfigName); + m_HomeURL = Util.GetConfigVarFromSections(config, "HomeURI", new string[] {"Startup", m_ConfigName}); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); } diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index dd546b8e06..776bf0c086 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs @@ -96,7 +96,7 @@ namespace OpenSim.Services.HypergridService if (m_AvatarService == null) throw new Exception(String.Format("Unable to create m_AvatarService from {0}", avatarDll)); - m_HomeURL = Util.GetConfigVarWithDefaultSection(config, "HomeURI", m_ConfigName); + m_HomeURL = Util.GetConfigVarFromSections(config, "HomeURI", new string[] {"Startup", m_ConfigName}); // m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); } diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 8757a4ca59..2ab0b87b2f 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -131,7 +131,7 @@ namespace OpenSim.Services.HypergridService LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_TripsAllowedExceptions); LoadDomainExceptionsFromConfig(serverConfig, "DisallowExcept", m_TripsDisallowedExceptions); - m_GridName = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "UserAgentService"); + m_GridName = Util.GetConfigVarFromSections(config, "GatekeeperURI", new string[] {"Startup", "UserAgentService"}); if (string.IsNullOrEmpty(m_GridName)) // Legacy. Remove soon. { m_GridName = serverConfig.GetString("ExternalName", string.Empty); diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 7f32d3058d..0fbd090f49 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -110,7 +110,7 @@ namespace OpenSim.Services.LLLoginService m_RequireInventory = m_LoginServerConfig.GetBoolean("RequireInventory", true); m_AllowRemoteSetLoginLevel = m_LoginServerConfig.GetBoolean("AllowRemoteSetLoginLevel", false); m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0); - m_GatekeeperURL = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "LoginService"); + m_GatekeeperURL = Util.GetConfigVarFromSections(config, "GatekeeperURI", new string[] {"Startup", "LoginService"}); m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); m_ProfileURL = m_LoginServerConfig.GetString("ProfileServerURL", string.Empty); m_OpenIDURL = m_LoginServerConfig.GetString("OpenIDServerURL", String.Empty); From c72c238f5df4279cfbe9d1fa42a6dc3f29f774d5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 23 Feb 2013 11:16:50 -0800 Subject: [PATCH 5/7] Improved documentation of Groups section. --- bin/OpenSim.ini.example | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 4199441a53..22678ee8a8 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -958,8 +958,12 @@ ; StorageProvider = OpenSim.Data.MySQL.dll ;# {ServicesConnectorModule} {Module:GroupsModule Module:Groups Module V2} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector "Groups Local Service Connector" "Groups Remote Service Connector" "Groups HG Service Connector"} XmlRpcGroupsServicesConnector - ;; Service connectors to the Groups Service as used in the GroupsModule. Select one depending on - ;; whether you're using a Flotsam XmlRpc backend or a SimianGrid backend or several flavours of V2, Hypergrided or not, standalone or grided. + ;; Service connectors to the Groups Service as used in the GroupsModule. Select one as follows: + ;; -- for Flotsam Groups use XmlRpcGroupsServicesConnector + ;; -- for Simian Groups use SimianGroupsServicesConnector + ;; -- for V2 Groups, standalone, non-HG use "Groups Local Service Connector" + ;; -- for V2 Groups, grided sim, non-HG use "Groups Remote Service Connector" + ;; -- for V2 Groups, HG, both standalone and grided sim, use "Groups HG Service Connector" ; ServicesConnectorModule = XmlRpcGroupsServicesConnector ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local From a0161e7161d3c22a35fa804ab10b2c02923d1d9b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 23 Feb 2013 11:21:14 -0800 Subject: [PATCH 6/7] Further clarification on the same spot. --- bin/OpenSim.ini.example | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 22678ee8a8..667511dfe1 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -964,6 +964,7 @@ ;; -- for V2 Groups, standalone, non-HG use "Groups Local Service Connector" ;; -- for V2 Groups, grided sim, non-HG use "Groups Remote Service Connector" ;; -- for V2 Groups, HG, both standalone and grided sim, use "Groups HG Service Connector" + ;; Note that the quotes "" around the words are important! ; ServicesConnectorModule = XmlRpcGroupsServicesConnector ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local From 6a01683aeb3c343c780aa5ffb2020a1c006dc4bb Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 23 Feb 2013 11:24:11 -0800 Subject: [PATCH 7/7] More clarification on the [Groups] section --- bin/OpenSim.ini.example | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 667511dfe1..5aeae8a1f0 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -976,6 +976,7 @@ ;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc ;; or http://mygridserver.com:82/Grid/ for SimianGrid ;; or http:://mygridserver.com:8003 for robust, V2 + ;; Leave it commented for standalones, V2 ; GroupsServerURI = "" ;# {HomeURI} {ServicesConnectorModule:Groups HG Service Connector} {What's the home address of this world?} {}