summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--net-im/jabberd/files/jabberd-2.1.11-r1.patch20
1 files changed, 18 insertions, 2 deletions
diff --git a/net-im/jabberd/files/jabberd-2.1.11-r1.patch b/net-im/jabberd/files/jabberd-2.1.11-r1.patch
index 441163c..6eba147 100644
--- a/net-im/jabberd/files/jabberd-2.1.11-r1.patch
+++ b/net-im/jabberd/files/jabberd-2.1.11-r1.patch
@@ -95,2 +95,18 @@ index 099aec9..29dca26 100644
AC_SUBST(PGSQL_LIBS)
+diff --git a/etc/c2s.xml.dist.in b/etc/c2s.xml.dist.in
+index 873a133..0589ada 100644
+--- a/etc/c2s.xml.dist.in
++++ b/etc/c2s.xml.dist.in
+@@ -325,6 +325,11 @@
+
+ <!-- PostgreSQL module configuration -->
+ <pgsql>
++ <!-- PostgreSQL connection info -->
++ <conninfo>dbname=jabberd2 user=jabberd2 password=secret</conninfo>
++
++ <!-- The rest of connection settings are used only in absence of 'conninfo' -->
++
+ <!-- Database server host and port -->
+ <host>localhost</host>
+ <port>5432</port>
diff --git a/mio/mio_impl.h b/mio/mio_impl.h
@@ -162,3 +178,3 @@ index 06f9e6e..5abf065 100644
diff --git a/storage/authreg_pgsql.c b/storage/authreg_pgsql.c
-index 1f15e83..8d3cf88 100644
+index 1f15e83..cb68e7d 100644
--- a/storage/authreg_pgsql.c
@@ -187,5 +203,5 @@ index 1f15e83..8d3cf88 100644
+ if(conninfo) {
-+ conn = PQconnect(conninfo);
+ /* don't log connection info for it can contain password */
+ log_debug( ZONE, "pgsql connecting to the databse");
++ conn = PQconnectdb(conninfo);
+ }else{