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.

This commit is contained in:
Diva Canto
2013-02-21 17:26:19 -08:00
parent efb5da0aa6
commit e515cdddec
16 changed files with 152 additions and 66 deletions

View File

@@ -170,14 +170,6 @@ namespace OpenSim.Server.Handlers.Grid
public string JsonGetGridInfoMethod(string request, string path, string param,
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
string HomeURI = String.Empty;
IConfig cfg = m_Config.Configs["LoginService"];
if (null != cfg)
{
HomeURI = cfg.GetString("SRV_HomeURI", HomeURI);
}
OSDMap map = new OSDMap();
foreach (string k in _info.Keys)
@@ -185,9 +177,19 @@ namespace OpenSim.Server.Handlers.Grid
map[k] = OSD.FromString(_info[k].ToString());
}
string HomeURI = Util.GetConfigVarWithDefaultSection(m_Config, "HomeURI", string.Empty);
if (!String.IsNullOrEmpty(HomeURI))
map["home"] = OSD.FromString(HomeURI);
else // Legacy. Remove soon!
{
map["home"] = OSD.FromString(HomeURI);
IConfig cfg = m_Config.Configs["LoginService"];
if (null != cfg)
HomeURI = cfg.GetString("SRV_HomeURI", HomeURI);
if (!String.IsNullOrEmpty(HomeURI))
map["home"] = OSD.FromString(HomeURI);
}
return OSDParser.SerializeJsonString(map).ToString();