mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
ScriptServer fixes: Added more debug logging, mutex lock (to be extra-super-sure) on script load/unload, removed experimental Grid-scriptengine from compile because of dynamic module loader, and added random string to script filename to bypass module loader file lock.
Please delete your copy of bin/ScriptEngine/OpenSim.Grid.ScriptEngine.DotNetEngine.dll.
This commit is contained in:
@@ -39,6 +39,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||
private LSL2CSConverter LSL_Converter = new LSL2CSConverter();
|
||||
private CSharpCodeProvider codeProvider = new CSharpCodeProvider();
|
||||
private static UInt64 scriptCompileCounter = 0;
|
||||
private static int instanceID = new Random().Next(0, int.MaxValue); // Implemented due to peer preassure --- will cause garbage in ScriptEngines folder ;)
|
||||
//private ICodeCompiler icc = codeProvider.CreateCompiler();
|
||||
public string CompileFromFile(string LSOFileName)
|
||||
{
|
||||
@@ -82,7 +83,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||
{
|
||||
// Output assembly name
|
||||
scriptCompileCounter++;
|
||||
string OutFile = Path.Combine("ScriptEngines", "Script_" + scriptCompileCounter + ".dll");
|
||||
string OutFile = Path.Combine("ScriptEngines", "DotNetScript_" + instanceID.ToString() + "_" + scriptCompileCounter.ToString() + ".dll");
|
||||
try
|
||||
{
|
||||
File.Delete(OutFile);
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||
|
||||
public string Convert(string Script)
|
||||
{
|
||||
quotes.Clear();
|
||||
string Return = "";
|
||||
Script = " \r\n" + Script;
|
||||
|
||||
@@ -310,6 +311,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||
Return += Script;
|
||||
Return += "} }\r\n";
|
||||
|
||||
|
||||
quotes.Clear();
|
||||
|
||||
return Return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user