aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL
diff options
context:
space:
mode:
authorRobert Adams2013-10-28 09:30:26 -0700
committerRobert Adams2013-10-28 09:30:26 -0700
commit2be0347f5044ec723748c53db9290f3cf8bc431a (patch)
treeb52812ac7fcdcd8a7a985094e14ca3d461a39673 /OpenSim/Data/PGSQL
parentvarregion: update PGSQL driver for storing variable terrain size blobs. (diff)
parentBulletSim: restore collision flags when clear collision cache. (diff)
downloadopensim-SC_OLD-2be0347f5044ec723748c53db9290f3cf8bc431a.zip
opensim-SC_OLD-2be0347f5044ec723748c53db9290f3cf8bc431a.tar.gz
opensim-SC_OLD-2be0347f5044ec723748c53db9290f3cf8bc431a.tar.bz2
opensim-SC_OLD-2be0347f5044ec723748c53db9290f3cf8bc431a.tar.xz
Merge branch 'master' into varregion
Diffstat (limited to 'OpenSim/Data/PGSQL')
-rw-r--r--OpenSim/Data/PGSQL/PGSQLEstateData.cs2
-rw-r--r--OpenSim/Data/PGSQL/PGSQLFramework.cs29
-rw-r--r--OpenSim/Data/PGSQL/PGSQLManager.cs29
3 files changed, 59 insertions, 1 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLEstateData.cs b/OpenSim/Data/PGSQL/PGSQLEstateData.cs
index 141b8ed..5ad0eaa 100644
--- a/OpenSim/Data/PGSQL/PGSQLEstateData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLEstateData.cs
@@ -452,7 +452,7 @@ namespace OpenSim.Data.PGSQL
452 public List<int> GetEstates(string search) 452 public List<int> GetEstates(string search)
453 { 453 {
454 List<int> result = new List<int>(); 454 List<int> result = new List<int>();
455 string sql = "select \"estateID\" from estate_settings where lower(\"EstateName\") = lower(:EstateName)"; 455 string sql = "select \"EstateID\" from estate_settings where lower(\"EstateName\") = lower(:EstateName)";
456 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 456 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
457 { 457 {
458 conn.Open(); 458 conn.Open();
diff --git a/OpenSim/Data/PGSQL/PGSQLFramework.cs b/OpenSim/Data/PGSQL/PGSQLFramework.cs
index 494b0aa..1028e4e 100644
--- a/OpenSim/Data/PGSQL/PGSQLFramework.cs
+++ b/OpenSim/Data/PGSQL/PGSQLFramework.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using System.Reflection;
32using OpenMetaverse; 33using OpenMetaverse;
33using OpenSim.Framework; 34using OpenSim.Framework;
34using Npgsql; 35using Npgsql;
@@ -50,8 +51,36 @@ namespace OpenSim.Data.PGSQL
50 protected PGSqlFramework(string connectionString) 51 protected PGSqlFramework(string connectionString)
51 { 52 {
52 m_connectionString = connectionString; 53 m_connectionString = connectionString;
54 InitializeMonoSecurity();
53 } 55 }
54 56
57 public void InitializeMonoSecurity()
58 {
59 if (!Util.IsPlatformMono)
60 {
61
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 }
69 }
70 }
71
72 private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args)
73 {
74 Assembly MyAssembly = null;
75
76 if (args.Name.Substring(0, args.Name.IndexOf(",")) == "Mono.Security")
77 {
78 MyAssembly = Assembly.LoadFrom("lib/NET/Mono.Security.dll");
79 }
80
81 //Return the loaded assembly.
82 return MyAssembly;
83 }
55 ////////////////////////////////////////////////////////////// 84 //////////////////////////////////////////////////////////////
56 // 85 //
57 // All non queries are funneled through one connection 86 // All non queries are funneled through one connection
diff --git a/OpenSim/Data/PGSQL/PGSQLManager.cs b/OpenSim/Data/PGSQL/PGSQLManager.cs
index 3ddaf38..97f40b2 100644
--- a/OpenSim/Data/PGSQL/PGSQLManager.cs
+++ b/OpenSim/Data/PGSQL/PGSQLManager.cs
@@ -30,6 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.IO; 31using System.IO;
32using System.Reflection; 32using System.Reflection;
33using OpenSim.Framework;
33using log4net; 34using log4net;
34using OpenMetaverse; 35using OpenMetaverse;
35using Npgsql; 36using Npgsql;
@@ -56,6 +57,34 @@ namespace OpenSim.Data.PGSQL
56 public PGSQLManager(string connection) 57 public PGSQLManager(string connection)
57 { 58 {
58 connectionString = connection; 59 connectionString = connection;
60 InitializeMonoSecurity();
61 }
62
63 public void InitializeMonoSecurity()
64 {
65 if (!Util.IsPlatformMono)
66 {
67 if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
68 {
69 AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
70
71 AppDomain currentDomain = AppDomain.CurrentDomain;
72 currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
73 }
74 }
75 }
76
77 private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args)
78 {
79 Assembly MyAssembly = null;
80
81 if (args.Name.Substring(0, args.Name.IndexOf(",")) == "Mono.Security")
82 {
83 MyAssembly = Assembly.LoadFrom("lib/NET/Mono.Security.dll");
84 }
85
86 //Return the loaded assembly.
87 return MyAssembly;
59 } 88 }
60 89
61 /// <summary> 90 /// <summary>