diff options
author | Mic Bowman | 2012-04-25 09:52:44 -0700 |
---|---|---|
committer | Mic Bowman | 2012-04-25 09:52:44 -0700 |
commit | 1afae013111b7c817037371fca805a78c3ab67cc (patch) | |
tree | dc4f08217c64fd92f4fac250344f009f583fca4e /OpenSim/Region/ScriptEngine/XEngine | |
parent | Add try/catch around Json script method registration to avoild some issues (diff) | |
parent | Slight rewording of output messages. (diff) | |
download | opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.zip opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.tar.gz opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.tar.bz2 opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index b7903d5..a9b6e67 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -1021,11 +1021,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1021 | 1021 | ||
1022 | AppDomain sandbox; | 1022 | AppDomain sandbox; |
1023 | if (m_AppDomainLoading) | 1023 | if (m_AppDomainLoading) |
1024 | { | ||
1024 | sandbox = AppDomain.CreateDomain( | 1025 | sandbox = AppDomain.CreateDomain( |
1025 | m_Scene.RegionInfo.RegionID.ToString(), | 1026 | m_Scene.RegionInfo.RegionID.ToString(), |
1026 | evidence, appSetup); | 1027 | evidence, appSetup); |
1028 | sandbox.AssemblyResolve += | ||
1029 | new ResolveEventHandler( | ||
1030 | AssemblyResolver.OnAssemblyResolve); | ||
1031 | } | ||
1027 | else | 1032 | else |
1033 | { | ||
1028 | sandbox = AppDomain.CurrentDomain; | 1034 | sandbox = AppDomain.CurrentDomain; |
1035 | } | ||
1029 | 1036 | ||
1030 | //PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel(); | 1037 | //PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel(); |
1031 | //AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition(); | 1038 | //AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition(); |
@@ -1037,9 +1044,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1037 | 1044 | ||
1038 | m_AppDomains[appDomain] = sandbox; | 1045 | m_AppDomains[appDomain] = sandbox; |
1039 | 1046 | ||
1040 | m_AppDomains[appDomain].AssemblyResolve += | ||
1041 | new ResolveEventHandler( | ||
1042 | AssemblyResolver.OnAssemblyResolve); | ||
1043 | m_DomainScripts[appDomain] = new List<UUID>(); | 1047 | m_DomainScripts[appDomain] = new List<UUID>(); |
1044 | } | 1048 | } |
1045 | catch (Exception e) | 1049 | catch (Exception e) |
@@ -1808,9 +1812,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1808 | // if there already exists a file at that location, it may be locked. | 1812 | // if there already exists a file at that location, it may be locked. |
1809 | m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", path, ex.Message); | 1813 | m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", path, ex.Message); |
1810 | } | 1814 | } |
1815 | |||
1816 | string textpath = path + ".text"; | ||
1811 | try | 1817 | try |
1812 | { | 1818 | { |
1813 | using (FileStream fs = File.Create(path + ".text")) | 1819 | using (FileStream fs = File.Create(textpath)) |
1814 | { | 1820 | { |
1815 | using (StreamWriter sw = new StreamWriter(fs)) | 1821 | using (StreamWriter sw = new StreamWriter(fs)) |
1816 | { | 1822 | { |
@@ -1823,7 +1829,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1823 | catch (IOException ex) | 1829 | catch (IOException ex) |
1824 | { | 1830 | { |
1825 | // if there already exists a file at that location, it may be locked. | 1831 | // if there already exists a file at that location, it may be locked. |
1826 | m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", path, ex.Message); | 1832 | m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", textpath, ex.Message); |
1827 | } | 1833 | } |
1828 | } | 1834 | } |
1829 | } | 1835 | } |
@@ -1872,7 +1878,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1872 | catch (IOException ex) | 1878 | catch (IOException ex) |
1873 | { | 1879 | { |
1874 | // if there already exists a file at that location, it may be locked. | 1880 | // if there already exists a file at that location, it may be locked. |
1875 | m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", statepath, ex.Message); | 1881 | m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", mappath, ex.Message); |
1876 | } | 1882 | } |
1877 | } | 1883 | } |
1878 | 1884 | ||
@@ -1984,4 +1990,4 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1984 | // m_log.DebugFormat("[XEngine]: Could not find script with ID {0} to resume", itemID); | 1990 | // m_log.DebugFormat("[XEngine]: Could not find script with ID {0} to resume", itemID); |
1985 | } | 1991 | } |
1986 | } | 1992 | } |
1987 | } \ No newline at end of file | 1993 | } |