فهرست منبع

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

(SER-227 related)
Andrei Pelinescu-Onciul 18 سال پیش
والد
کامیت
28e784e433
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  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");