فهرست منبع

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

(SER-227 related)
Andrei Pelinescu-Onciul 18 سال پیش
والد
کامیت
4f2d8d2103
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      modules/db_mysql/dbase.c

+ 1 - 2
modules/db_mysql/dbase.c

@@ -258,10 +258,9 @@ db_con_t* db_init(const char* _url)
 	res = 0;
 	res = 0;
 
 
 	/* if called from PROC_MAIN, allow it only from mod_init( when pt==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: mysql: db_init: called from the main process,"
 		LOG(L_ERR, "BUG: mysql: db_init: called from the main process,"
 					" ignoring...\n");
 					" ignoring...\n");
-		return 0;
 	}
 	}
 
 
 	if (!_url) {
 	if (!_url) {