From 0f616d2ffe6f8d2ab1618967f78af542aef6db29 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 15 Dec 2009 15:42:51 +0000 Subject: Prevent OSSL from crashing if the sim was loaded from a remote config and osGetGridName, osGetGridNick or osGetGridLoginURI is used. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim') 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 CheckThreatLevel(ThreatLevel.Moderate, "osGetGridNick"); m_host.AddScriptLPS(1); string nick = "hippogrid"; - IConfigSource config = new IniConfigSource(Application.iniFilePath); + IConfigSource config = m_ScriptEngine.ConfigSource; if (config.Configs["GridInfo"] != null) nick = config.Configs["GridInfo"].GetString("gridnick", nick); return nick; @@ -1750,7 +1750,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName"); m_host.AddScriptLPS(1); string name = "the lost continent of hippo"; - IConfigSource config = new IniConfigSource(Application.iniFilePath); + IConfigSource config = m_ScriptEngine.ConfigSource; if (config.Configs["GridInfo"] != null) name = config.Configs["GridInfo"].GetString("gridname", name); return name; @@ -1761,7 +1761,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(ThreatLevel.Moderate, "osGetGridLoginURI"); m_host.AddScriptLPS(1); string loginURI = "http://127.0.0.1:9000/"; - IConfigSource config = new IniConfigSource(Application.iniFilePath); + IConfigSource config = m_ScriptEngine.ConfigSource; if (config.Configs["GridInfo"] != null) loginURI = config.Configs["GridInfo"].GetString("login", loginURI); return loginURI; -- cgit v1.1