Blame SOURCES/bz1715308-fix-checkers-comparison-on-reload.patch

9cfb40
From 8e42d6970457336bd92d327c628e38129f221f8a Mon Sep 17 00:00:00 2001
9cfb40
From: Quentin Armitage <quentin@armitage.org.uk>
9cfb40
Date: Mon, 17 Jul 2017 11:43:28 +0100
9cfb40
Subject: [PATCH] Correct comparison for checker compare in
9cfb40
 migrate_failed_checkers
9cfb40
9cfb40
Commit 2ff6b3f changed the sense of the comparisons of checkers,
9cfb40
but didn't make the corresponding change to checking the result.
9cfb40
9cfb40
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
9cfb40
---
9cfb40
 keepalived/check/check_api.c | 4 ++--
9cfb40
 keepalived/check/ipwrapper.c | 2 +-
9cfb40
 2 files changed, 3 insertions(+), 3 deletions(-)
9cfb40
9cfb40
diff --git a/keepalived/check/check_api.c b/keepalived/check/check_api.c
9cfb40
index 1d915414..82b0f2df 100644
9cfb40
--- a/keepalived/check/check_api.c
9cfb40
+++ b/keepalived/check/check_api.c
9cfb40
@@ -266,8 +266,8 @@ register_checkers_thread(void)
9cfb40
 
9cfb40
 	for (e = LIST_HEAD(checkers_queue); e; ELEMENT_NEXT(e)) {
9cfb40
 		checker = ELEMENT_DATA(e);
9cfb40
-		log_message(LOG_INFO, "%sctivating healthchecker for service %s"
9cfb40
-				    , checker->enabled ? "A" : "Dea", FMT_VS(checker->vs));
9cfb40
+		log_message(LOG_INFO, "%sctivating healthchecker for service %s"
9cfb40
+				    , checker->enabled ? "A" : "Dea", FMT_VS(checker->vs));
9cfb40
 		if (checker->launch)
9cfb40
 		{
9cfb40
 			/* wait for a random timeout to begin checker thread.
9cfb40
diff --git a/keepalived/check/ipwrapper.c b/keepalived/check/ipwrapper.c
9cfb40
index 17f0157d..ad8c3154 100644
9cfb40
--- a/keepalived/check/ipwrapper.c
9cfb40
+++ b/keepalived/check/ipwrapper.c
9cfb40
@@ -649,7 +649,7 @@ migrate_failed_checkers(real_server_t *old_rs, real_server_t *new_rs)
9cfb40
 			continue;
9cfb40
 		for (e1 = LIST_HEAD(l); e1; ELEMENT_NEXT(e1)) {
9cfb40
 			old_c = ELEMENT_DATA(e1);
9cfb40
-			if (old_c->compare == new_c->compare && new_c->compare(old_c, new_c) == 0) {
9cfb40
+			if (old_c->compare == new_c->compare && new_c->compare(old_c, new_c)) {
9cfb40
 				if (svr_checker_up(old_c->id, old_rs) == 0) {
9cfb40
 					id = (checker_id_t *) MALLOC(sizeof(checker_id_t));
9cfb40
 					*id = new_c->id;
9cfb40
-- 
9cfb40
2.21.0
9cfb40