Explorar o código

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 %!s(int64=16) %!d(string=hai) anos
pai
achega
9d8e1c67c2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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");