aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2013-02-21 17:26:19 -0800
committerDiva Canto2013-02-21 17:26:19 -0800
commite515cdddec435e97e9ed4722de08ee410e94a7e6 (patch)
tree0b090dc495ef464e037d4f134f059bce35504d2f /OpenSim/Region
parentBulletSim: add OutOfBounds logic and some position sanity checking (diff)
downloadopensim-SC_OLD-e515cdddec435e97e9ed4722de08ee410e94a7e6.zip
opensim-SC_OLD-e515cdddec435e97e9ed4722de08ee410e94a7e6.tar.gz
opensim-SC_OLD-e515cdddec435e97e9ed4722de08ee410e94a7e6.tar.bz2
opensim-SC_OLD-e515cdddec435e97e9ed4722de08ee410e94a7e6.tar.xz
Simplification of HG configs: HomeURI and GatekeeperURI now are defined as default under [Startup]. They can then be overwritten in the other sections (but probably shouldn't). I kept the existing code for backwards compatibility, so this should not cause any breaks from people's current configurations. But people should move to have these 2 vars under [Startup] -- see OpenSim.ini.example and Robust.HG.ini.example. And yes, both names now end with "URI" for consistency.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs9
-rw-r--r--OpenSim/Region/DataSnapshot/DataSnapshotManager.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs12
4 files changed, 27 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
index 232a4fe..784a788 100644
--- a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
@@ -65,7 +65,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
65 { 65 {
66 m_Enabled = true; 66 m_Enabled = true;
67 67
68 m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", string.Empty); 68 m_ThisGridURL = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "Messaging");
69 // Legacy. Remove soon!
70 m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL);
69 m_log.DebugFormat("[LURE MODULE]: {0} enabled", Name); 71 m_log.DebugFormat("[LURE MODULE]: {0} enabled", Name);
70 } 72 }
71 } 73 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 964efda..c439ea8 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -88,12 +88,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
88 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"]; 88 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"];
89 if (thisModuleConfig != null) 89 if (thisModuleConfig != null)
90 { 90 {
91 // legacy configuration [obsolete] 91 m_HomeURI = Util.GetConfigVarWithDefaultSection(source, "HomeURI", "HGInventoryAccessModule");
92 m_HomeURI = thisModuleConfig.GetString("ProfileServerURI", string.Empty);
93 // preferred
94 m_HomeURI = thisModuleConfig.GetString("HomeURI", m_HomeURI);
95 m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true); 92 m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true);
96 m_ThisGatekeeper = thisModuleConfig.GetString("Gatekeeper", string.Empty); 93 m_ThisGatekeeper = Util.GetConfigVarWithDefaultSection(source, "GatekeeperURI", "HGInventoryAccessModule");
94 // Legacy. Renove soon!
95 m_ThisGatekeeper = thisModuleConfig.GetString("Gatekeeper", m_ThisGatekeeper);
97 m_RestrictInventoryAccessAbroad = thisModuleConfig.GetBoolean("RestrictInventoryAccessAbroad", true); 96 m_RestrictInventoryAccessAbroad = thisModuleConfig.GetBoolean("RestrictInventoryAccessAbroad", true);
98 } 97 }
99 else 98 else
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
index 5e62f23..13d9d31 100644
--- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
+++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
@@ -113,9 +113,16 @@ namespace OpenSim.Region.DataSnapshot
113 try 113 try
114 { 114 {
115 m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled); 115 m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled);
116 IConfig conf = config.Configs["GridService"]; 116 string gatekeeper = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", "GridService");
117 if (conf != null) 117 // Legacy. Remove soon!
118 m_gridinfo.Add("gatekeeperURL", conf.GetString("Gatekeeper", String.Empty)); 118 if (string.IsNullOrEmpty(gatekeeper))
119 {
120 IConfig conf = config.Configs["GridService"];
121 if (conf != null)
122 gatekeeper = conf.GetString("Gatekeeper", gatekeeper);
123 }
124 if (!string.IsNullOrEmpty(gatekeeper))
125 m_gridinfo.Add("gatekeeperURL", gatekeeper);
119 126
120 m_gridinfo.Add( 127 m_gridinfo.Add(
121 "name", config.Configs["DataSnapshot"].GetString("gridname", "the lost continent of hippo")); 128 "name", config.Configs["DataSnapshot"].GetString("gridname", "the lost continent of hippo"));
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 1426070..0334169 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2137,9 +2137,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2137 CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI"); 2137 CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI");
2138 m_host.AddScriptLPS(1); 2138 m_host.AddScriptLPS(1);
2139 2139
2140 string HomeURI = String.Empty;
2141 IConfigSource config = m_ScriptEngine.ConfigSource; 2140 IConfigSource config = m_ScriptEngine.ConfigSource;
2141 string HomeURI = Util.GetConfigVarWithDefaultSection(config, "HomeURI", string.Empty);
2142 2142
2143 if (!string.IsNullOrEmpty(HomeURI))
2144 return HomeURI;
2145
2146 // Legacy. Remove soon!
2143 if (config.Configs["LoginService"] != null) 2147 if (config.Configs["LoginService"] != null)
2144 HomeURI = config.Configs["LoginService"].GetString("SRV_HomeURI", HomeURI); 2148 HomeURI = config.Configs["LoginService"].GetString("SRV_HomeURI", HomeURI);
2145 2149
@@ -2154,9 +2158,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2154 CheckThreatLevel(ThreatLevel.Moderate, "osGetGridGatekeeperURI"); 2158 CheckThreatLevel(ThreatLevel.Moderate, "osGetGridGatekeeperURI");
2155 m_host.AddScriptLPS(1); 2159 m_host.AddScriptLPS(1);
2156 2160
2157 string gatekeeperURI = String.Empty;
2158 IConfigSource config = m_ScriptEngine.ConfigSource; 2161 IConfigSource config = m_ScriptEngine.ConfigSource;
2162 string gatekeeperURI = Util.GetConfigVarWithDefaultSection(config, "GatekeeperURI", string.Empty);
2163
2164 if (!string.IsNullOrEmpty(gatekeeperURI))
2165 return gatekeeperURI;
2159 2166
2167 // Legacy. Remove soon!
2160 if (config.Configs["GridService"] != null) 2168 if (config.Configs["GridService"] != null)
2161 gatekeeperURI = config.Configs["GridService"].GetString("Gatekeeper", gatekeeperURI); 2169 gatekeeperURI = config.Configs["GridService"].GetString("Gatekeeper", gatekeeperURI);
2162 2170