[icinga-checkins] icinga.org: icinga-core/mfriedrich/workers: core: fix logical bug on max_check_reaper_time detection

git at icinga.org git at icinga.org
Tue Aug 7 15:17:55 CEST 2012


Module: icinga-core
Branch: mfriedrich/workers
Commit: c3bb9ed1bfce2760c4c82172390db66d38881e32
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=c3bb9ed1bfce2760c4c82172390db66d38881e32

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Tue Aug  7 15:15:52 2012 +0200

core: fix logical bug on max_check_reaper_time detection

refs #2952

---

 base/utils.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/base/utils.c b/base/utils.c
index d02dcbf..e9d4f52 100644
--- a/base/utils.c
+++ b/base/utils.c
@@ -2466,8 +2466,7 @@ int process_check_result_queue(char *dirname) {
 		}
 
 		/* break out if we've been here too long */
-		int reap_time = (int)(time(NULL) - start);
-		if (reap_time > max_check_reaper_time) {
+		if ((int)(time(NULL) - start) < max_check_reaper_time) {
 			log_debug_info(DEBUGL_CHECKS, 0, "Breaking out of check result reaper: max time (%d<%d) exceeded\n", (int)(time(NULL) - start), max_check_reaper_time);
 			break;
 		}





More information about the icinga-checkins mailing list