瀏覽代碼

core: fix cfg_update() on config error 2nd try

The cfg framework is considered initialized only after
the cfg_child_cb_no_init() call.
Fixes 29e63735632a379df5d6b49130d05d47e2829a60.
Andrei Pelinescu-Onciul 16 年之前
父節點
當前提交
9d8e1c67c2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      main.c

+ 1 - 1
main.c

@@ -1548,6 +1548,7 @@ int main_loop()
 #endif
 #endif
 		/* init cfg, but without per child callbacks support */
 		/* init cfg, but without per child callbacks support */
 		cfg_child_no_cb_init();
 		cfg_child_no_cb_init();
+		cfg_ok=1;
 
 
 #ifdef EXTRA_DEBUG
 #ifdef EXTRA_DEBUG
 		for (r=0; r<*process_count; r++){
 		for (r=0; r<*process_count; r++){
@@ -2088,7 +2089,6 @@ try_again:
 		LOG(L_CRIT, "could not declare the core configuration\n");
 		LOG(L_CRIT, "could not declare the core configuration\n");
 		goto error;
 		goto error;
 	}
 	}
-	cfg_ok=1;
 #ifdef USE_TCP
 #ifdef USE_TCP
 	if (tcp_register_cfg()){
 	if (tcp_register_cfg()){
 		LOG(L_CRIT, "could not register the tcp configuration\n");
 		LOG(L_CRIT, "could not register the tcp configuration\n");