aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
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/Server/Handlers/Grid/GridInfoHandlers.cs
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 '')
-rw-r--r--OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs20
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
index 965a54e..35f86c5 100644
--- a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
+++ b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
@@ -170,14 +170,6 @@ namespace OpenSim.Server.Handlers.Grid
170 public string JsonGetGridInfoMethod(string request, string path, string param, 170 public string JsonGetGridInfoMethod(string request, string path, string param,
171 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 171 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
172 { 172 {
173 string HomeURI = String.Empty;
174 IConfig cfg = m_Config.Configs["LoginService"];
175
176 if (null != cfg)
177 {
178 HomeURI = cfg.GetString("SRV_HomeURI", HomeURI);
179 }
180
181 OSDMap map = new OSDMap(); 173 OSDMap map = new OSDMap();
182 174
183 foreach (string k in _info.Keys) 175 foreach (string k in _info.Keys)
@@ -185,9 +177,19 @@ namespace OpenSim.Server.Handlers.Grid
185 map[k] = OSD.FromString(_info[k].ToString()); 177 map[k] = OSD.FromString(_info[k].ToString());
186 } 178 }
187 179
180 string HomeURI = Util.GetConfigVarWithDefaultSection(m_Config, "HomeURI", string.Empty);
181
188 if (!String.IsNullOrEmpty(HomeURI)) 182 if (!String.IsNullOrEmpty(HomeURI))
183 map["home"] = OSD.FromString(HomeURI);
184 else // Legacy. Remove soon!
189 { 185 {
190 map["home"] = OSD.FromString(HomeURI); 186 IConfig cfg = m_Config.Configs["LoginService"];
187
188 if (null != cfg)
189 HomeURI = cfg.GetString("SRV_HomeURI", HomeURI);
190
191 if (!String.IsNullOrEmpty(HomeURI))
192 map["home"] = OSD.FromString(HomeURI);
191 } 193 }
192 194
193 return OSDParser.SerializeJsonString(map).ToString(); 195 return OSDParser.SerializeJsonString(map).ToString();