Browse code

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 authored on 12/10/2009 19:20:02
Showing 1 changed files
... ...
@@ -1548,6 +1548,7 @@ int main_loop()
1548 1548
 #endif
1549 1549
 		/* init cfg, but without per child callbacks support */
1550 1550
 		cfg_child_no_cb_init();
1551
+		cfg_ok=1;
1551 1552
 
1552 1553
 #ifdef EXTRA_DEBUG
1553 1554
 		for (r=0; r<*process_count; r++){
... ...
@@ -2088,7 +2089,6 @@ try_again:
2088 2088
 		LOG(L_CRIT, "could not declare the core configuration\n");
2089 2089
 		goto error;
2090 2090
 	}
2091
-	cfg_ok=1;
2092 2091
 #ifdef USE_TCP
2093 2092
 	if (tcp_register_cfg()){
2094 2093
 		LOG(L_CRIT, "could not register the tcp configuration\n");