From 3bf56575680a198be35a8643c34969bf801e9c5f Mon Sep 17 00:00:00 2001 From: Juan Jose Nicola Date: Tue, 17 Oct 2023 09:42:36 +0200 Subject: [PATCH] Change: Don't perform alive tests if "consider alive" method is selected When more than one alive test method is selected, boreas check for each one until the host is alive. This will be done also even if the "consider alive" methods is selected. This patch improves boreas to not run other selected alive methods if "consider alive" method is set --- boreas/boreas_io.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/boreas/boreas_io.c b/boreas/boreas_io.c index 23532deb..5fe1ed5d 100644 --- a/boreas/boreas_io.c +++ b/boreas/boreas_io.c @@ -474,6 +474,12 @@ get_alive_test_methods (alive_test_t *alive_test) { *alive_test = atoi (alive_test_pref_as_str); } + + // If consider_alive method is set, unset the other methods + // since it doesn't make sense. + if (*alive_test & ALIVE_TEST_CONSIDER_ALIVE) + *alive_test = ALIVE_TEST_CONSIDER_ALIVE; + return error; }