aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
authorMelanie2012-02-07 21:09:04 +0000
committerMelanie2012-02-07 21:09:04 +0000
commit37049180f62d9b284c3ef1892cbf384774f6a2e3 (patch)
tree6f4a73fdfed2c7750cae6f8691a74ef5a0a8745b /OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
parentMerge branch 'master' into careminster (diff)
parentAdd TestAddTaskInventoryItem() (diff)
downloadopensim-SC-37049180f62d9b284c3ef1892cbf384774f6a2e3.zip
opensim-SC-37049180f62d9b284c3ef1892cbf384774f6a2e3.tar.gz
opensim-SC-37049180f62d9b284c3ef1892cbf384774f6a2e3.tar.bz2
opensim-SC-37049180f62d9b284c3ef1892cbf384774f6a2e3.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs22
1 files changed, 21 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 084ef48..02d47bd 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -747,6 +747,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
747 747
748 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource) 748 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource)
749 { 749 {
750// m_log.DebugFormat(
751// "[XEngine]: OnRezScript event triggered for script {0}, startParam {1}, postOnRez {2}, engine {3}, stateSource {4}, script\n{5}",
752// itemID, startParam, postOnRez, engine, stateSource, script);
753
750 if (script.StartsWith("//MRM:")) 754 if (script.StartsWith("//MRM:"))
751 return; 755 return;
752 756
@@ -828,6 +832,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
828 m_CompileDict[itemID] = 0; 832 m_CompileDict[itemID] = 0;
829 } 833 }
830 834
835// m_log.DebugFormat("[XEngine]: Added script {0} to compile queue", itemID);
836
831 if (m_CurrentCompile == null) 837 if (m_CurrentCompile == null)
832 { 838 {
833 // NOTE: Although we use a lockless queue, the lock here 839 // NOTE: Although we use a lockless queue, the lock here
@@ -889,6 +895,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
889 bool postOnRez = (bool)p[4]; 895 bool postOnRez = (bool)p[4];
890 StateSource stateSource = (StateSource)p[5]; 896 StateSource stateSource = (StateSource)p[5];
891 897
898// m_log.DebugFormat("[XEngine]: DoOnRezScript called for script {0}", itemID);
899
892 lock (m_CompileDict) 900 lock (m_CompileDict)
893 { 901 {
894 if (!m_CompileDict.ContainsKey(itemID)) 902 if (!m_CompileDict.ContainsKey(itemID))
@@ -937,7 +945,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
937 { 945 {
938 try 946 try
939 { 947 {
940 lock (m_AddingAssemblies) 948 lock (m_AddingAssemblies)
941 { 949 {
942 m_Compiler.PerformScriptCompile(script, assetID.ToString(), item.OwnerID, out assembly, out linemap); 950 m_Compiler.PerformScriptCompile(script, assetID.ToString(), item.OwnerID, out assembly, out linemap);
943 if (!m_AddingAssemblies.ContainsKey(assembly)) { 951 if (!m_AddingAssemblies.ContainsKey(assembly)) {
@@ -989,6 +997,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
989 } 997 }
990 catch (Exception e) 998 catch (Exception e)
991 { 999 {
1000// m_log.ErrorFormat("[XEngine]: Exception when rezzing script {0}{1}", e.Message, e.StackTrace);
1001
992 // try 1002 // try
993 // { 1003 // {
994 if (!m_ScriptErrors.ContainsKey(itemID)) 1004 if (!m_ScriptErrors.ContainsKey(itemID))
@@ -1464,6 +1474,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1464 string path = Path.Combine(Directory.GetCurrentDirectory(), 1474 string path = Path.Combine(Directory.GetCurrentDirectory(),
1465 Path.Combine(s, assemblyName))+".dll"; 1475 Path.Combine(s, assemblyName))+".dll";
1466 1476
1477// Console.WriteLine("[XEngine]: Trying to resolve {0}", path);
1478
1467 if (File.Exists(path)) 1479 if (File.Exists(path))
1468 return Assembly.LoadFrom(path); 1480 return Assembly.LoadFrom(path);
1469 } 1481 }
@@ -1949,16 +1961,24 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1949 1961
1950 public void SuspendScript(UUID itemID) 1962 public void SuspendScript(UUID itemID)
1951 { 1963 {
1964// m_log.DebugFormat("[XEngine]: Received request to suspend script with ID {0}", itemID);
1965
1952 IScriptInstance instance = GetInstance(itemID); 1966 IScriptInstance instance = GetInstance(itemID);
1953 if (instance != null) 1967 if (instance != null)
1954 instance.Suspend(); 1968 instance.Suspend();
1969// else
1970// m_log.DebugFormat("[XEngine]: Could not find script with ID {0} to resume", itemID);
1955 } 1971 }
1956 1972
1957 public void ResumeScript(UUID itemID) 1973 public void ResumeScript(UUID itemID)
1958 { 1974 {
1975// m_log.DebugFormat("[XEngine]: Received request to resume script with ID {0}", itemID);
1976
1959 IScriptInstance instance = GetInstance(itemID); 1977 IScriptInstance instance = GetInstance(itemID);
1960 if (instance != null) 1978 if (instance != null)
1961 instance.Resume(); 1979 instance.Resume();
1980// else
1981// m_log.DebugFormat("[XEngine]: Could not find script with ID {0} to resume", itemID);
1962 } 1982 }
1963 1983
1964 public bool HasScript(UUID itemID, out bool running) 1984 public bool HasScript(UUID itemID, out bool running)