For osGetGridNick(), osGetGridName(), osGetGridLoginURI() and osGetGridCustom(), try to read from the [GridInfoService] section on standalone rather than [GridInfo]

[GridInfoService] is the section that's actually in bin/config-include/StandaloneCommon.ini.example
0.7.3-extended
Justin Clark-Casey (justincc) 2012-05-07 19:05:21 +01:00
parent 25fa6ee699
commit dd0858e204
1 changed files with 10 additions and 8 deletions

View File

@ -128,6 +128,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public const string GridInfoServiceConfigSectionName = "GridInfoService";
internal IScriptEngine m_ScriptEngine; internal IScriptEngine m_ScriptEngine;
internal ILSL_Api m_LSL_Api = null; // get a reference to the LSL API so we can call methods housed there internal ILSL_Api m_LSL_Api = null; // get a reference to the LSL API so we can call methods housed there
internal SceneObjectPart m_host; internal SceneObjectPart m_host;
@ -2041,8 +2043,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
string nick = String.Empty; string nick = String.Empty;
IConfigSource config = m_ScriptEngine.ConfigSource; IConfigSource config = m_ScriptEngine.ConfigSource;
if (config.Configs["GridInfo"] != null) if (config.Configs[GridInfoServiceConfigSectionName] != null)
nick = config.Configs["GridInfo"].GetString("gridnick", nick); nick = config.Configs[GridInfoServiceConfigSectionName].GetString("gridnick", nick);
if (String.IsNullOrEmpty(nick)) if (String.IsNullOrEmpty(nick))
nick = GridUserInfo(InfoType.Nick); nick = GridUserInfo(InfoType.Nick);
@ -2058,8 +2060,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
string name = String.Empty; string name = String.Empty;
IConfigSource config = m_ScriptEngine.ConfigSource; IConfigSource config = m_ScriptEngine.ConfigSource;
if (config.Configs["GridInfo"] != null) if (config.Configs[GridInfoServiceConfigSectionName] != null)
name = config.Configs["GridInfo"].GetString("gridname", name); name = config.Configs[GridInfoServiceConfigSectionName].GetString("gridname", name);
if (String.IsNullOrEmpty(name)) if (String.IsNullOrEmpty(name))
name = GridUserInfo(InfoType.Name); name = GridUserInfo(InfoType.Name);
@ -2075,8 +2077,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
string loginURI = String.Empty; string loginURI = String.Empty;
IConfigSource config = m_ScriptEngine.ConfigSource; IConfigSource config = m_ScriptEngine.ConfigSource;
if (config.Configs["GridInfo"] != null) if (config.Configs[GridInfoServiceConfigSectionName] != null)
loginURI = config.Configs["GridInfo"].GetString("login", loginURI); loginURI = config.Configs[GridInfoServiceConfigSectionName].GetString("login", loginURI);
if (String.IsNullOrEmpty(loginURI)) if (String.IsNullOrEmpty(loginURI))
loginURI = GridUserInfo(InfoType.Login); loginURI = GridUserInfo(InfoType.Login);
@ -2109,8 +2111,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
string retval = String.Empty; string retval = String.Empty;
IConfigSource config = m_ScriptEngine.ConfigSource; IConfigSource config = m_ScriptEngine.ConfigSource;
if (config.Configs["GridInfo"] != null) if (config.Configs[GridInfoServiceConfigSectionName] != null)
retval = config.Configs["GridInfo"].GetString(key, retval); retval = config.Configs[GridInfoServiceConfigSectionName].GetString(key, retval);
if (String.IsNullOrEmpty(retval)) if (String.IsNullOrEmpty(retval))
retval = GridUserInfo(InfoType.Custom, key); retval = GridUserInfo(InfoType.Custom, key);