aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorFernando Oliveira2013-10-16 21:20:11 -0500
committerfernando2013-10-16 21:20:11 -0500
commitf83343d3022d568f4fdbbfa79fee867ba4d2e9ec (patch)
tree8d4857a13517fd0b448d6f8d92d1a58a69b5c593
parent* Fixes mantis mantis 0006803 [PGSQL] - Simulator crashes - Mono.Security.dll... (diff)
downloadopensim-SC_OLD-f83343d3022d568f4fdbbfa79fee867ba4d2e9ec.zip
opensim-SC_OLD-f83343d3022d568f4fdbbfa79fee867ba4d2e9ec.tar.gz
opensim-SC_OLD-f83343d3022d568f4fdbbfa79fee867ba4d2e9ec.tar.bz2
opensim-SC_OLD-f83343d3022d568f4fdbbfa79fee867ba4d2e9ec.tar.xz
* One More thing, add an appdomain data element to ensure that we don't duplicate the assembly resolving.
-rw-r--r--OpenSim/Data/PGSQL/PGSQLFramework.cs10
-rw-r--r--OpenSim/Data/PGSQL/PGSQLManager.cs9
2 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLFramework.cs b/OpenSim/Data/PGSQL/PGSQLFramework.cs
index 48f8dd3..1028e4e 100644
--- a/OpenSim/Data/PGSQL/PGSQLFramework.cs
+++ b/OpenSim/Data/PGSQL/PGSQLFramework.cs
@@ -58,8 +58,14 @@ namespace OpenSim.Data.PGSQL
58 { 58 {
59 if (!Util.IsPlatformMono) 59 if (!Util.IsPlatformMono)
60 { 60 {
61 AppDomain currentDomain = AppDomain.CurrentDomain; 61
62 currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec); 62 if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
63 {
64 AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
65
66 AppDomain currentDomain = AppDomain.CurrentDomain;
67 currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
68 }
63 } 69 }
64 } 70 }
65 71
diff --git a/OpenSim/Data/PGSQL/PGSQLManager.cs b/OpenSim/Data/PGSQL/PGSQLManager.cs
index 2084fe9..97f40b2 100644
--- a/OpenSim/Data/PGSQL/PGSQLManager.cs
+++ b/OpenSim/Data/PGSQL/PGSQLManager.cs
@@ -64,8 +64,13 @@ namespace OpenSim.Data.PGSQL
64 { 64 {
65 if (!Util.IsPlatformMono) 65 if (!Util.IsPlatformMono)
66 { 66 {
67 AppDomain currentDomain = AppDomain.CurrentDomain; 67 if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
68 currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec); 68 {
69 AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
70
71 AppDomain currentDomain = AppDomain.CurrentDomain;
72 currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
73 }
69 } 74 }
70 } 75 }
71 76