aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-19 02:11:46 +0100
committerJustin Clark-Casey (justincc)2012-06-19 02:11:46 +0100
commitef686ead37f475ad9e16f637fe1efc41cfbbd6f4 (patch)
tree01e5a64d39241fe3b224479f9e4d6188752df75a /OpenSim/Region/ScriptEngine/XEngine
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-ef686ead37f475ad9e16f637fe1efc41cfbbd6f4.zip
opensim-SC_OLD-ef686ead37f475ad9e16f637fe1efc41cfbbd6f4.tar.gz
opensim-SC_OLD-ef686ead37f475ad9e16f637fe1efc41cfbbd6f4.tar.bz2
opensim-SC_OLD-ef686ead37f475ad9e16f637fe1efc41cfbbd6f4.tar.xz
Like the assembly and text files, only write the c#-lsl linemap in XEngine.SetXMLState() if the trust binaries flag is set.
This doesn't affect other locations where the map is written, such as on script compilation.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs54
1 files changed, 27 insertions, 27 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 35c338d..aedf2c1 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1835,6 +1835,33 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1835 m_log.ErrorFormat("[XEngine]: Error whilst writing .text file {0}, {1}", textpath, ex.Message); 1835 m_log.ErrorFormat("[XEngine]: Error whilst writing .text file {0}, {1}", textpath, ex.Message);
1836 } 1836 }
1837 } 1837 }
1838
1839 XmlNodeList mapL = rootE.GetElementsByTagName("LineMap");
1840 if (mapL.Count > 0)
1841 {
1842 XmlElement mapE = (XmlElement)mapL[0];
1843
1844 string mappath = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString());
1845 mappath = Path.Combine(mappath, mapE.GetAttribute("Filename"));
1846
1847 try
1848 {
1849 using (FileStream mfs = File.Create(mappath))
1850 {
1851 using (StreamWriter msw = new StreamWriter(mfs))
1852 {
1853 // m_log.DebugFormat("[XEngine]: Writing linemap file {0}", mappath);
1854
1855 msw.Write(mapE.InnerText);
1856 }
1857 }
1858 }
1859 catch (IOException ex)
1860 {
1861 // if there already exists a file at that location, it may be locked.
1862 m_log.ErrorFormat("[XEngine]: Linemap file {0} already exists! {1}", mappath, ex.Message);
1863 }
1864 }
1838 } 1865 }
1839 1866
1840 string statepath = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString()); 1867 string statepath = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString());
@@ -1858,33 +1885,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1858 m_log.ErrorFormat("[XEngine]: Error whilst writing state file {0}, {1}", statepath, ex.Message); 1885 m_log.ErrorFormat("[XEngine]: Error whilst writing state file {0}, {1}", statepath, ex.Message);
1859 } 1886 }
1860 1887
1861 XmlNodeList mapL = rootE.GetElementsByTagName("LineMap");
1862 if (mapL.Count > 0)
1863 {
1864 XmlElement mapE = (XmlElement)mapL[0];
1865
1866 string mappath = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString());
1867 mappath = Path.Combine(mappath, mapE.GetAttribute("Filename"));
1868
1869 try
1870 {
1871 using (FileStream mfs = File.Create(mappath))
1872 {
1873 using (StreamWriter msw = new StreamWriter(mfs))
1874 {
1875// m_log.DebugFormat("[XEngine]: Writing linemap file {0}", mappath);
1876
1877 msw.Write(mapE.InnerText);
1878 }
1879 }
1880 }
1881 catch (IOException ex)
1882 {
1883 // if there already exists a file at that location, it may be locked.
1884 m_log.ErrorFormat("[XEngine]: Linemap file {0} already exists! {1}", mappath, ex.Message);
1885 }
1886 }
1887
1888 return true; 1888 return true;
1889 } 1889 }
1890 1890