Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=886... Commit: 886ea3f60b91e6ce8bec1cb089a50d674f3d19c3 Parent: 198c4860e2c04a979c4ee7500aaf49c7f97d1efe Author: Fabio M. Di Nitto fdinitto@redhat.com AuthorDate: Tue Jul 27 10:13:08 2010 +0200 Committer: Fabio M. Di Nitto fdinitto@redhat.com CommitterDate: Tue Jul 27 10:13:08 2010 +0200
cman: simply message broadcasting handling
the timer that automatically attempts to reload the configuration is never invoked in cases where broadcasting the message is required.
Remove the complexity in the code.
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com --- cman/daemon/commands.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c index 3bff57a..22ba50a 100644 --- a/cman/daemon/commands.c +++ b/cman/daemon/commands.c @@ -86,7 +86,6 @@ static int shutdown_yes; static int shutdown_no; static int shutdown_expected; static int ccsd_timer_active = 0; -static int ccsd_timer_should_broadcast = 0;
static struct cluster_node *find_node_by_nodeid(int nodeid); static struct cluster_node *find_node_by_name(char *name); @@ -1203,7 +1202,6 @@ static int reload_config(int new_version, int should_broadcast)
if (!ccsd_timer_active) { log_printf(LOG_ERR, "Error reloading the configuration, will retry every second\n"); - ccsd_timer_should_broadcast = should_broadcast; corosync->timer_add_duration((unsigned long long)ccsd_poll_interval*1000000, NULL, ccsd_timer_fn, &ccsd_timer); ccsd_timer_active = 1; @@ -1237,7 +1235,7 @@ static void ccsd_timer_fn(void *arg)
ccsd_timer_active = 0;
- if (!reload_config(wanted_config_version, ccsd_timer_should_broadcast) && + if (!reload_config(wanted_config_version, 0) && config_version >= wanted_config_version) { log_printf(LOG_DEBUG, "ccsd_timer_fn got the new config\n"); config_error = 0;
cluster-commits@lists.fedorahosted.org