From 76b53a4e207696c535a45f4358a8e047ca936e45 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sat, 6 Feb 2010 22:57:51 +0100 Subject: Adds some log messages related to configure. Also fixes a bug in the previous patch. --- conf/conf.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'conf') diff --git a/conf/conf.c b/conf/conf.c index bc0715ae..58eb10a6 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -57,7 +57,7 @@ static jmp_buf conf_jmpbuf; struct config *config, *new_config, *old_config, *future_config; static event *config_event; -int shutting_down; +int shutting_down, future_type; bird_clock_t boot_time; /** @@ -201,6 +201,7 @@ config_do_commit(struct config *c, int type) config = new_config = c; if (old_config) old_config->obstacle_count++; + DBG("sysdep_commit\n"); force_restart = sysdep_commit(c, old_config); DBG("global_commit\n"); @@ -238,8 +239,8 @@ config_done(void *unused UNUSED) break; c = future_config; future_config = NULL; - log(L_INFO "Switching to queued configuration..."); - if (!config_do_commit(c, RECONFIG_HARD)) + log(L_INFO "Reconfiguring to queued configuration"); + if (!config_do_commit(c, future_type)) break; } } @@ -290,8 +291,13 @@ config_commit(struct config *c, int type) else log(L_INFO "Queued new configuration"); future_config = c; + future_type = type; return CONF_QUEUED; } + + if (!shutting_down) + log(L_INFO "Reconfiguring"); + if (config_do_commit(c, type)) { config_done(NULL); -- cgit v1.2.3