Backport the http request fix to stable

0.6.5-post-fixes
Melanie Thielker 2009-06-06 16:52:58 +00:00
parent b74cd49f7c
commit be2ed074fa
5 changed files with 18 additions and 7 deletions

View File

@ -73,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
// that has been running too long
public static MaintenanceThread m_MaintenanceThread;
public IConfigSource ConfigSource;
private IConfigSource m_ConfigSource;
public IConfig ScriptConfigSource;
private bool m_enabled = false;
@ -82,6 +82,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
get { return ScriptConfigSource; }
}
public IConfigSource ConfigSource
{
get { return ConfigSource; }
}
// How many seconds between re-reading config-file.
// 0 = never. ScriptEngine will try to adjust to new config changes.
public int RefreshConfigFileSeconds {
@ -119,7 +124,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
public void Initialise(IConfigSource config)
{
ConfigSource = config;
m_ConfigSource = config;
}
public void AddRegion(Scene Sceneworld)

View File

@ -80,6 +80,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
void ApiResetScript(UUID itemID);
void ResetScript(UUID itemID);
IConfig Config { get; }
IConfigSource ConfigSource { get; }
string ScriptEngineName { get; }
IScriptApi GetApi(UUID itemID, string name);
}

View File

@ -7935,11 +7935,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llSetObjectPermMask(int mask, int value)
{
m_host.AddScriptLPS(1);
IConfigSource config = new IniConfigSource(Application.iniFilePath);
if (config.Configs["XEngine"] == null)
config.AddConfig("XEngine");
if (config.Configs["XEngine"].GetBoolean("AllowGodFunctions", false))
if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false))
{
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
{
@ -8947,7 +8944,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
Dictionary<string, string> httpHeaders = new Dictionary<string, string>();
string shard = "OpenSim";
IConfigSource config = new IniConfigSource(Application.iniFilePath);
IConfigSource config = m_ScriptEngine.ConfigSource;
if (config.Configs["Network"] != null)
{
shard

View File

@ -947,6 +947,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
"Line ({0}): {1}", scriptLine - 1,
e.InnerException.Message);
System.Console.WriteLine(e.ToString()+"\n");
return message;
}
}

View File

@ -60,6 +60,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
private int m_MaxScriptQueue;
private Scene m_Scene;
private IConfig m_ScriptConfig = null;
private IConfigSource m_ConfigSource = null;
private ICompiler m_Compiler;
private int m_MinThreads;
private int m_MaxThreads ;
@ -148,6 +149,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
get { return m_ScriptConfig; }
}
public IConfigSource ConfigSource
{
get { return m_ConfigSource; }
}
public event ScriptRemoved OnScriptRemoved;
public event ObjectRemoved OnObjectRemoved;
@ -160,6 +166,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
return;
m_ScriptConfig = configSource.Configs["XEngine"];
m_ConfigSource = configSource;
}
public void AddRegion(Scene scene)