Browse Source

- relax db_init BUG check (allow db init from fixup functions)

(SER-227 related)
Andrei Pelinescu-Onciul 18 years ago
parent
commit
28e784e433
1 changed files with 1 additions and 2 deletions
  1. 1 2
      modules/db_postgres/dbase.c

+ 1 - 2
modules/db_postgres/dbase.c

@@ -230,10 +230,9 @@ db_con_t* pg_init(const char* url)
 	res = 0;
 
 	/* if called from PROC_MAIN, allow it only from mod_init( when pt==0)*/
-	if (is_main && pt){
+	if (is_main && fixup_complete){
 		LOG(L_ERR, "BUG: postgres: pg_init: called from the main process,"
 					" ignoring...\n");
-		return 0;
 	}
 	if (!url) {
 		ERR("Invalid parameter value\n");