diff options
author | Melanie | 2009-12-15 15:42:51 +0000 |
---|---|---|
committer | Melanie | 2009-12-15 15:42:51 +0000 |
commit | 0f616d2ffe6f8d2ab1618967f78af542aef6db29 (patch) | |
tree | d0c7fd6f2f0c9d27c006a84145dc102b32621c31 /OpenSim/Region | |
parent | Make the HG map search recognize host names without ports. (diff) | |
download | opensim-SC-0f616d2ffe6f8d2ab1618967f78af542aef6db29.zip opensim-SC-0f616d2ffe6f8d2ab1618967f78af542aef6db29.tar.gz opensim-SC-0f616d2ffe6f8d2ab1618967f78af542aef6db29.tar.bz2 opensim-SC-0f616d2ffe6f8d2ab1618967f78af542aef6db29.tar.xz |
Prevent OSSL from crashing if the sim was loaded from a remote config and
osGetGridName, osGetGridNick or osGetGridLoginURI is used.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 1b7db7c..9c7604b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1739,7 +1739,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1739 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridNick"); | 1739 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridNick"); |
1740 | m_host.AddScriptLPS(1); | 1740 | m_host.AddScriptLPS(1); |
1741 | string nick = "hippogrid"; | 1741 | string nick = "hippogrid"; |
1742 | IConfigSource config = new IniConfigSource(Application.iniFilePath); | 1742 | IConfigSource config = m_ScriptEngine.ConfigSource; |
1743 | if (config.Configs["GridInfo"] != null) | 1743 | if (config.Configs["GridInfo"] != null) |
1744 | nick = config.Configs["GridInfo"].GetString("gridnick", nick); | 1744 | nick = config.Configs["GridInfo"].GetString("gridnick", nick); |
1745 | return nick; | 1745 | return nick; |
@@ -1750,7 +1750,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1750 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName"); | 1750 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName"); |
1751 | m_host.AddScriptLPS(1); | 1751 | m_host.AddScriptLPS(1); |
1752 | string name = "the lost continent of hippo"; | 1752 | string name = "the lost continent of hippo"; |
1753 | IConfigSource config = new IniConfigSource(Application.iniFilePath); | 1753 | IConfigSource config = m_ScriptEngine.ConfigSource; |
1754 | if (config.Configs["GridInfo"] != null) | 1754 | if (config.Configs["GridInfo"] != null) |
1755 | name = config.Configs["GridInfo"].GetString("gridname", name); | 1755 | name = config.Configs["GridInfo"].GetString("gridname", name); |
1756 | return name; | 1756 | return name; |
@@ -1761,7 +1761,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1761 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridLoginURI"); | 1761 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridLoginURI"); |
1762 | m_host.AddScriptLPS(1); | 1762 | m_host.AddScriptLPS(1); |
1763 | string loginURI = "http://127.0.0.1:9000/"; | 1763 | string loginURI = "http://127.0.0.1:9000/"; |
1764 | IConfigSource config = new IniConfigSource(Application.iniFilePath); | 1764 | IConfigSource config = m_ScriptEngine.ConfigSource; |
1765 | if (config.Configs["GridInfo"] != null) | 1765 | if (config.Configs["GridInfo"] != null) |
1766 | loginURI = config.Configs["GridInfo"].GetString("login", loginURI); | 1766 | loginURI = config.Configs["GridInfo"].GetString("login", loginURI); |
1767 | return loginURI; | 1767 | return loginURI; |