소스 검색

- 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");