aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-20 00:19:50 +0100
committerJustin Clark-Casey (justincc)2012-06-20 00:19:50 +0100
commit881e92a7260a5823867b8f93b88c1b706a13cb56 (patch)
treea983f3e42944f1fb9065dc75e0487065feffc5aa /OpenSim/Region
parentLog how many scripts are candidates for starting and how many are actually st... (diff)
downloadopensim-SC_OLD-881e92a7260a5823867b8f93b88c1b706a13cb56.zip
opensim-SC_OLD-881e92a7260a5823867b8f93b88c1b706a13cb56.tar.gz
opensim-SC_OLD-881e92a7260a5823867b8f93b88c1b706a13cb56.tar.bz2
opensim-SC_OLD-881e92a7260a5823867b8f93b88c1b706a13cb56.tar.xz
Raise some IO associated Exception logging in XEngine to error level, in line with other similar cases.
Remove more unnecessary Close() calls - these are being triggered by the Dispose() called when exiting the using statement for these sdk io objects.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 3f623de..35b58ee 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1715,14 +1715,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1715 FileMode.Open, FileAccess.Read)) 1715 FileMode.Open, FileAccess.Read))
1716 { 1716 {
1717 tfs.Read(tdata, 0, tdata.Length); 1717 tfs.Read(tdata, 0, tdata.Length);
1718 tfs.Close();
1719 } 1718 }
1720 1719
1721 assem = new System.Text.ASCIIEncoding().GetString(tdata); 1720 assem = new System.Text.ASCIIEncoding().GetString(tdata);
1722 } 1721 }
1723 catch (Exception e) 1722 catch (Exception e)
1724 { 1723 {
1725 m_log.DebugFormat("[XEngine]: Unable to open script textfile {0}, reason: {1}", assemName+".text", e.Message); 1724 m_log.ErrorFormat(
1725 "[XEngine]: Unable to open script textfile {0}{1}, reason: {2}",
1726 assemName, ".text", e.Message);
1726 } 1727 }
1727 } 1728 }
1728 } 1729 }
@@ -1739,16 +1740,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1739 using (FileStream fs = File.Open(assemName, FileMode.Open, FileAccess.Read)) 1740 using (FileStream fs = File.Open(assemName, FileMode.Open, FileAccess.Read))
1740 { 1741 {
1741 fs.Read(data, 0, data.Length); 1742 fs.Read(data, 0, data.Length);
1742 fs.Close();
1743 } 1743 }
1744 1744
1745 assem = System.Convert.ToBase64String(data); 1745 assem = System.Convert.ToBase64String(data);
1746 } 1746 }
1747 catch (Exception e) 1747 catch (Exception e)
1748 { 1748 {
1749 m_log.DebugFormat("[XEngine]: Unable to open script assembly {0}, reason: {1}", assemName, e.Message); 1749 m_log.ErrorFormat(
1750 "[XEngine]: Unable to open script assembly {0}, reason: {1}", assemName, e.Message);
1750 } 1751 }
1751
1752 } 1752 }
1753 } 1753 }
1754 1754
@@ -1761,9 +1761,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1761 using (StreamReader msr = new StreamReader(mfs)) 1761 using (StreamReader msr = new StreamReader(mfs))
1762 { 1762 {
1763 map = msr.ReadToEnd(); 1763 map = msr.ReadToEnd();
1764 msr.Close();
1765 } 1764 }
1766 mfs.Close();
1767 } 1765 }
1768 } 1766 }
1769 1767