diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index e82d297..c0ec0e8 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -89,6 +89,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
89 | private IXmlRpcRouter m_XmlRpcRouter; | 89 | private IXmlRpcRouter m_XmlRpcRouter; |
90 | private int m_EventLimit; | 90 | private int m_EventLimit; |
91 | private bool m_KillTimedOutScripts; | 91 | private bool m_KillTimedOutScripts; |
92 | private string m_ScriptEnginesPath = null; | ||
92 | 93 | ||
93 | private static List<XEngine> m_ScriptEngines = | 94 | private static List<XEngine> m_ScriptEngines = |
94 | new List<XEngine>(); | 95 | new List<XEngine>(); |
@@ -224,6 +225,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
224 | get { return m_ScriptConfig; } | 225 | get { return m_ScriptConfig; } |
225 | } | 226 | } |
226 | 227 | ||
228 | public string ScriptEnginePath | ||
229 | { | ||
230 | get { return m_ScriptEnginesPath; } | ||
231 | } | ||
232 | |||
227 | public IConfigSource ConfigSource | 233 | public IConfigSource ConfigSource |
228 | { | 234 | { |
229 | get { return m_ConfigSource; } | 235 | get { return m_ConfigSource; } |
@@ -281,6 +287,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
281 | m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30); | 287 | m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30); |
282 | m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false); | 288 | m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false); |
283 | m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000; | 289 | m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000; |
290 | m_ScriptEnginesPath = m_ScriptConfig.GetString("ScriptEnginesPath", "ScriptEngines"); | ||
284 | 291 | ||
285 | m_Prio = ThreadPriority.BelowNormal; | 292 | m_Prio = ThreadPriority.BelowNormal; |
286 | switch (priority) | 293 | switch (priority) |
@@ -478,7 +485,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
478 | return 0; | 485 | return 0; |
479 | } | 486 | } |
480 | 487 | ||
481 | public Type ReplaceableInterface | 488 | public Type ReplaceableInterface |
482 | { | 489 | { |
483 | get { return null; } | 490 | get { return null; } |
484 | } | 491 | } |
@@ -1040,7 +1047,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1040 | startInfo.IdleTimeout = idleTimeout*1000; // convert to seconds as stated in .ini | 1047 | startInfo.IdleTimeout = idleTimeout*1000; // convert to seconds as stated in .ini |
1041 | startInfo.MaxWorkerThreads = maxThreads; | 1048 | startInfo.MaxWorkerThreads = maxThreads; |
1042 | startInfo.MinWorkerThreads = minThreads; | 1049 | startInfo.MinWorkerThreads = minThreads; |
1043 | startInfo.ThreadPriority = threadPriority; | 1050 | startInfo.ThreadPriority = threadPriority;; |
1044 | startInfo.StackSize = stackSize; | 1051 | startInfo.StackSize = stackSize; |
1045 | startInfo.StartSuspended = true; | 1052 | startInfo.StartSuspended = true; |
1046 | 1053 | ||
@@ -1186,8 +1193,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1186 | if (!(sender is System.AppDomain)) | 1193 | if (!(sender is System.AppDomain)) |
1187 | return null; | 1194 | return null; |
1188 | 1195 | ||
1189 | string[] pathList = new string[] {"bin", "ScriptEngines", | 1196 | string[] pathList = new string[] {"bin", m_ScriptEnginesPath, |
1190 | Path.Combine("ScriptEngines", | 1197 | Path.Combine(m_ScriptEnginesPath, |
1191 | m_Scene.RegionInfo.RegionID.ToString())}; | 1198 | m_Scene.RegionInfo.RegionID.ToString())}; |
1192 | 1199 | ||
1193 | string assemblyName = args.Name; | 1200 | string assemblyName = args.Name; |
@@ -1564,7 +1571,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1564 | string fn = assemE.GetAttribute("Filename"); | 1571 | string fn = assemE.GetAttribute("Filename"); |
1565 | string base64 = assemE.InnerText; | 1572 | string base64 = assemE.InnerText; |
1566 | 1573 | ||
1567 | string path = Path.Combine("ScriptEngines", World.RegionInfo.RegionID.ToString()); | 1574 | string path = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString()); |
1568 | path = Path.Combine(path, fn); | 1575 | path = Path.Combine(path, fn); |
1569 | 1576 | ||
1570 | if (!File.Exists(path)) | 1577 | if (!File.Exists(path)) |
@@ -1604,7 +1611,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1604 | } | 1611 | } |
1605 | } | 1612 | } |
1606 | 1613 | ||
1607 | string statepath = Path.Combine("ScriptEngines", World.RegionInfo.RegionID.ToString()); | 1614 | string statepath = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString()); |
1608 | statepath = Path.Combine(statepath, itemID.ToString() + ".state"); | 1615 | statepath = Path.Combine(statepath, itemID.ToString() + ".state"); |
1609 | 1616 | ||
1610 | try | 1617 | try |
@@ -1630,7 +1637,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1630 | { | 1637 | { |
1631 | XmlElement mapE = (XmlElement)mapL[0]; | 1638 | XmlElement mapE = (XmlElement)mapL[0]; |
1632 | 1639 | ||
1633 | string mappath = Path.Combine("ScriptEngines", World.RegionInfo.RegionID.ToString()); | 1640 | string mappath = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString()); |
1634 | mappath = Path.Combine(mappath, mapE.GetAttribute("Filename")); | 1641 | mappath = Path.Combine(mappath, mapE.GetAttribute("Filename")); |
1635 | 1642 | ||
1636 | try | 1643 | try |