Module: sip-router
Branch: janakj/postgres
Commit: 89143e1d58105a293193d92b132534295be4e717
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=89143e1…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Feb 22 15:56:48 2007 +0000
- fix the yesterday's fix: allow db_init from main if it's done from mod_init
(but don't allow it and log a BUG if it happens from child_init(PROC_MAIN)).
(SER-227 related)
---
modules/db_postgres/dbase.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/db_postgres/dbase.c b/modules/db_postgres/dbase.c
index 0305efa..17a86d5 100644
--- a/modules/db_postgres/dbase.c
+++ b/modules/db_postgres/dbase.c
@@ -40,6 +40,7 @@
#include "../../db/db_pool.h"
#include "../../ut.h"
#include "../../globals.h"
+#include "../../pt.h"
#include "pg_con.h"
#include "pg_type.h"
#include "db_mod.h"
@@ -228,7 +229,8 @@ db_con_t* pg_init(const char* url)
id = 0;
res = 0;
- if (is_main){
+ /* if called from PROC_MAIN, allow it only from mod_init( when pt==0)*/
+ if (is_main && pt){
LOG(L_ERR, "BUG: postgres: pg_init: called from the main process,"
" ignoring...\n");
return 0;
Module: sip-router
Branch: janakj/postgres
Commit: 62925779f2f900351e4e614d10725631d68741cf
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6292577…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Feb 22 00:24:16 2007 +0000
- fix: db connections should not be opened from child_init(PROC_MAIN),
or they will be inherited by all the tcp processes (bad). Bug reported by
Jan Andres <jan.andres(a)freenet-ag.de>.
closes SER-227
---
modules/db_postgres/dbase.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/db_postgres/dbase.c b/modules/db_postgres/dbase.c
index 60ccc95..0305efa 100644
--- a/modules/db_postgres/dbase.c
+++ b/modules/db_postgres/dbase.c
@@ -39,6 +39,7 @@
#include "../../dprint.h"
#include "../../db/db_pool.h"
#include "../../ut.h"
+#include "../../globals.h"
#include "pg_con.h"
#include "pg_type.h"
#include "db_mod.h"
@@ -227,6 +228,11 @@ db_con_t* pg_init(const char* url)
id = 0;
res = 0;
+ if (is_main){
+ LOG(L_ERR, "BUG: postgres: pg_init: called from the main process,"
+ " ignoring...\n");
+ return 0;
+ }
if (!url) {
ERR("Invalid parameter value\n");
return 0;
Module: sip-router
Branch: janakj/postgres
Commit: 6140cbfd4857ccf0a2df37b356f2c3b54b386990
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6140cbf…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Wed Nov 29 12:23:58 2006 +0000
- removed reference to serhelp(a)iptel.org, we will be using serusers(a)iptel.org instead
---
modules/db_postgres/README | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/modules/db_postgres/README b/modules/db_postgres/README
index 6e2bd9c..e943699 100644
--- a/modules/db_postgres/README
+++ b/modules/db_postgres/README
@@ -127,8 +127,6 @@ Chapter 3. Frequently Asked Questions
<serusers(a)iptel.org> and e-mail regarding development versions
or CVS snapshots should be send to <serdev(a)iptel.org>.
- If you want to keep the mail private, send it to
- <serhelp(a)iptel.org>.
3.3. How can I report a bug?