diff options
author | Tedd Hansen | 2007-11-01 19:27:03 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-11-01 19:27:03 +0000 |
commit | dcf41cb68370dc1e1b03fd78edf75b175b17f6ea (patch) | |
tree | 3b2079c88657beee8380cdd6acebd33a1891cc15 /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler | |
parent | * Diuerse beavtificatems (diff) | |
download | opensim-SC-dcf41cb68370dc1e1b03fd78edf75b175b17f6ea.zip opensim-SC-dcf41cb68370dc1e1b03fd78edf75b175b17f6ea.tar.gz opensim-SC-dcf41cb68370dc1e1b03fd78edf75b175b17f6ea.tar.bz2 opensim-SC-dcf41cb68370dc1e1b03fd78edf75b175b17f6ea.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 7f452e0..c81e6bd 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | |||
@@ -39,6 +39,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
39 | private LSL2CSConverter LSL_Converter = new LSL2CSConverter(); | 39 | private LSL2CSConverter LSL_Converter = new LSL2CSConverter(); |
40 | private CSharpCodeProvider codeProvider = new CSharpCodeProvider(); | 40 | private CSharpCodeProvider codeProvider = new CSharpCodeProvider(); |
41 | private static UInt64 scriptCompileCounter = 0; | 41 | private static UInt64 scriptCompileCounter = 0; |
42 | private static int instanceID = new Random().Next(0, int.MaxValue); // Implemented due to peer preassure --- will cause garbage in ScriptEngines folder ;) | ||
42 | //private ICodeCompiler icc = codeProvider.CreateCompiler(); | 43 | //private ICodeCompiler icc = codeProvider.CreateCompiler(); |
43 | public string CompileFromFile(string LSOFileName) | 44 | public string CompileFromFile(string LSOFileName) |
44 | { | 45 | { |
@@ -82,7 +83,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
82 | { | 83 | { |
83 | // Output assembly name | 84 | // Output assembly name |
84 | scriptCompileCounter++; | 85 | scriptCompileCounter++; |
85 | string OutFile = Path.Combine("ScriptEngines", "Script_" + scriptCompileCounter + ".dll"); | 86 | string OutFile = Path.Combine("ScriptEngines", "DotNetScript_" + instanceID.ToString() + "_" + scriptCompileCounter.ToString() + ".dll"); |
86 | try | 87 | try |
87 | { | 88 | { |
88 | File.Delete(OutFile); | 89 | File.Delete(OutFile); |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 0c28617..bbd6839 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |||
@@ -53,6 +53,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
53 | 53 | ||
54 | public string Convert(string Script) | 54 | public string Convert(string Script) |
55 | { | 55 | { |
56 | quotes.Clear(); | ||
56 | string Return = ""; | 57 | string Return = ""; |
57 | Script = " \r\n" + Script; | 58 | Script = " \r\n" + Script; |
58 | 59 | ||
@@ -310,6 +311,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
310 | Return += Script; | 311 | Return += Script; |
311 | Return += "} }\r\n"; | 312 | Return += "} }\r\n"; |
312 | 313 | ||
314 | |||
315 | quotes.Clear(); | ||
316 | |||
313 | return Return; | 317 | return Return; |
314 | } | 318 | } |
315 | } | 319 | } |