[sr-dev] git:sr_3.0: core: fix cfg_update() on config error 2nd try

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Oct 12 21:29:48 CEST 2009


Module: sip-router
Branch: sr_3.0
Commit: 9d8e1c67c2c22d4e4d00480e3799c72e0f2ade41
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9d8e1c67c2c22d4e4d00480e3799c72e0f2ade41

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Mon Oct 12 21:20:02 2009 +0200

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.

---

 main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/main.c b/main.c
index e5e0833..fc25588 100644
--- a/main.c
+++ b/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");




More information about the sr-dev mailing list