mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user