Quellcode durchsuchen

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 vor 16 Jahren
Ursprung
Commit
9d8e1c67c2
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      main.c

+ 1 - 1
main.c

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