@@ -0,0 +1,2107 @@
+diff -uNr icinga-core-1.14.0/AUTHORS icinga-core-1.14.2/AUTHORS
+--- icinga-core-1.14.0/AUTHORS 2016-12-22 22:40:50.000000000 +0100
++++ icinga-core-1.14.2/AUTHORS 2017-12-20 15:45:58.000000000 +0100
+@@ -1,3 +1,4 @@
++Adrian Lopez <adrianlzt@gmail.com>
+ Alexander Hofmann <alexander.hofmann@dfs.de>
+ Alexander Wirt <formorer@debian.org>
+ Andreas Ericsson <ae@op5.se>
+@@ -5,6 +6,7 @@
+ Assaf Flatto <icinga@flatto.net>
+ Bas Couwenberg <sebastic@xs4all.nl>
+ Bernd Arnold <bernd_a@gmx.de>
++brammeleman <brammeleman@users.noreply.github.com>
+ Carl Friend <crfriend@rcn.com>
+ Carl R. Friend <crfriend@rcn.com>
+ Chris Moates <six@mox.net>
+@@ -52,6 +54,7 @@
+ Thomas Dreßler <tdressler@tdressler.net>
+ Tim Hardeck <thardeck@suse.de>
+ Tim Schumacher <tschumacher@tourevo-software.com>
++Tobias Deiminger <haxtibal@t-online.de>
+ Tobias Redel <tobias.redel@netways.de>
+ Tobias Scherbaum <tobias@scherbaum.info>
+ Tomas Dubec <tomas.dubec@gmail.com>
+diff -uNr icinga-core-1.14.0/base/checks.c icinga-core-1.14.2/base/checks.c
+--- icinga-core-1.14.0/base/checks.c 2016-12-22 22:40:50.000000000 +0100
++++ icinga-core-1.14.2/base/checks.c 2017-12-20 15:45:58.000000000 +0100
+@@ -88,6 +88,8 @@
+ extern int passive_host_checks_are_soft;
+
+ extern int check_service_freshness;
++extern int log_stale_services;
++extern int log_stale_hosts;
+ extern int check_host_freshness;
+ extern int additional_freshness_latency;
+
+@@ -1592,9 +1594,12 @@
+
+ /* put service into a hard state without attempting check retries and don't send out notifications about it */
+ temp_service->host_problem_at_last_check = TRUE;
++ /* Below removed, causes trouble with SOFT recoveries - https://github.com/Icinga/icinga-core/issues/1594*/
++ /*
+ temp_service->state_type = HARD_STATE;
+ temp_service->last_hard_state = temp_service->current_state;
+ temp_service->current_attempt = 1;
++ */
+ }
+
+ /* the host is up - it recovered since the last time the service was checked... */
+@@ -2241,7 +2246,7 @@
+ continue;
+
+ /* the results for the last check of this service are stale! */
+- if (is_service_result_fresh(temp_service, current_time, TRUE) == FALSE) {
++ if (is_service_result_fresh(temp_service, current_time, log_stale_services) == FALSE) {
+
+ /* set the freshen flag */
+ temp_service->is_being_freshened = TRUE;
+@@ -2651,7 +2656,7 @@
+ continue;
+
+ /* the results for the last check of this host are stale */
+- if (is_host_result_fresh(temp_host, current_time, TRUE) == FALSE) {
++ if (is_host_result_fresh(temp_host, current_time, log_stale_hosts) == FALSE) {
+
+ /* set the freshen flag */
+ temp_host->is_being_freshened = TRUE;
+diff -uNr icinga-core-1.14.0/base/config.c icinga-core-1.14.2/base/config.c
+--- icinga-core-1.14.0/base/config.c 2016-12-22 22:40:50.000000000 +0100
++++ icinga-core-1.14.2/base/config.c 2017-12-20 15:45:58.000000000 +0100
+@@ -126,6 +126,8 @@
+ extern int check_orphaned_services;
+ extern int check_orphaned_hosts;
+ extern int check_service_freshness;
++extern int log_stale_services;
++extern int log_stale_hosts;
+ extern int check_host_freshness;
+ extern int auto_reschedule_checks;
+
+@@ -1164,6 +1166,28 @@
+ check_service_freshness = (atoi(value) > 0) ? TRUE : FALSE;
+ }
+
++ else if (!strcmp(variable, "log_stale_services")) {
++
++ if (strlen(value) != 1 || value[0] < '0' || value[0] > '1') {
++ asprintf(&error_message, "Illegal value for log_stale_services");
++ error = TRUE;
++ break;
++ }
++
++ log_stale_services = (atoi(value) > 0) ? TRUE : FALSE;
++ }
++
++ else if (!strcmp(variable, "log_stale_hosts")) {
++
++ if (strlen(value) != 1 || value[0] < '0' || value[0] > '1') {
++ asprintf(&error_message, "Illegal value for log_stale_hosts");
++ error = TRUE;
++ break;
++ }
++
++ log_stale_hosts = (atoi(value) > 0) ? TRUE : FALSE;
++ }
++
+ else if (!strcmp(variable, "check_host_freshness")) {
+
+ if (strlen(value) != 1 || value[0] < '0' || value[0] > '1') {
+diff -uNr icinga-core-1.14.0/base/icinga.c icinga-core-1.14.2/base/icinga.c
+--- icinga-core-1.14.0/base/icinga.c 2016-12-22 22:40:50.000000000 +0100
++++ icinga-core-1.14.2/base/icinga.c 2017-12-20 15:45:58.000000000 +0100
+@@ -126,6 +126,8 @@
+ int check_orphaned_services = DEFAULT_CHECK_ORPHANED_SERVICES;
+ int check_orphaned_hosts = DEFAULT_CHECK_ORPHANED_HOSTS;
+ int check_service_freshness = DEFAULT_CHECK_SERVICE_FRESHNESS;
++int log_stale_services = DEFAULT_LOG_STALE_SERVICES;
++int log_stale_hosts = DEFAULT_LOG_STALE_HOSTS;
+ int check_host_freshness = DEFAULT_CHECK_HOST_FRESHNESS;
+ int auto_reschedule_checks = DEFAULT_AUTO_RESCHEDULE_CHECKS;
+ int auto_rescheduling_window = DEFAULT_AUTO_RESCHEDULING_WINDOW;
+diff -uNr icinga-core-1.14.0/base/Makefile.in icinga-core-1.14.2/base/Makefile.in
+--- icinga-core-1.14.0/base/Makefile.in 2016-12-22 22:40:50.000000000 +0100
++++ icinga-core-1.14.2/base/Makefile.in 2017-12-20 15:45:58.000000000 +0100
+@@ -49,7 +49,6 @@
+ INSTALL=@INSTALL@
+ INSTALL_OPTS=@INSTALL_OPTS@
+ COMMAND_OPTS=@COMMAND_OPTS@
+-STRIP=@STRIP@
+
+ CGIURL=@cgiurl@
+ HTMURL=@htmurl@
+@@ -61,7 +60,7 @@
+ THREADLIBS=@THREADLIBS@
+ BROKERLIBS=@BROKERLIBS@
+
+-BROKER_LDFLAGS=@BROKER_LDFLAGS@
++BROKER_LDFLAGS=@BROKER_LDFLAGS@
+
+ CP=@CP@
+
+@@ -184,18 +183,7 @@
+ devclean: distclean
+
+ install:
+- $(MAKE) install-basic
+- $(MAKE) strip-post-install
+-
+-install-unstripped:
+- $(MAKE) install-basic
+-
+-install-basic:
+ $(INSTALL) -m 755 -d $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 -d $(DESTDIR)$(LIBDIR)
+- $(INSTALL) -m 755 $(INSTALL_OPTS) @icinga_name@ $(DESTDIR)$(BINDIR)
+- $(INSTALL) -m 755 $(INSTALL_OPTS) @icingastats_name@ $(DESTDIR)$(BINDIR)
+-
+-strip-post-install:
+- $(STRIP) $(DESTDIR)$(BINDIR)/@icinga_name@
+- $(STRIP) $(DESTDIR)$(BINDIR)/@icingastats_name@
++ $(INSTALL) -m 755 @icinga_name@ $(DESTDIR)$(BINDIR)
++ $(INSTALL) -m 755 @icingastats_name@ $(DESTDIR)$(BINDIR)
+diff -uNr icinga-core-1.14.0/base/utils.c icinga-core-1.14.2/base/utils.c
+--- icinga-core-1.14.0/base/utils.c 2016-12-22 22:40:50.000000000 +0100
++++ icinga-core-1.14.2/base/utils.c 2017-12-20 15:45:58.000000000 +0100
+@@ -144,6 +144,8 @@
+ extern int check_orphaned_services;
+ extern int check_orphaned_hosts;
+ extern int check_service_freshness;
++extern int log_stale_services;
++extern int log_stale_hosts;
+ extern int check_host_freshness;
+ extern int auto_reschedule_checks;
+
+@@ -4558,6 +4560,8 @@
+ check_orphaned_services = DEFAULT_CHECK_ORPHANED_SERVICES;
+ check_orphaned_hosts = DEFAULT_CHECK_ORPHANED_HOSTS;
+ check_service_freshness = DEFAULT_CHECK_SERVICE_FRESHNESS;
++ log_stale_services = DEFAULT_LOG_STALE_SERVICES;
++ log_stale_hosts = DEFAULT_LOG_STALE_HOSTS;
+ check_host_freshness = DEFAULT_CHECK_HOST_FRESHNESS;
+ auto_reschedule_checks = DEFAULT_AUTO_RESCHEDULE_CHECKS;
+
+diff -uNr icinga-core-1.14.0/cgi/Makefile.in icinga-core-1.14.2/cgi/Makefile.in
+--- icinga-core-1.14.0/cgi/Makefile.in 2016-12-22 22:40:50.000000000 +0100
++++ icinga-core-1.14.2/cgi/Makefile.in 2017-12-20 15:45:58.000000000 +0100
+@@ -21,7 +21,6 @@
+ INSTALL_OPTS=@INSTALL_OPTS@
+ INSTALL_OPTS_WEB=@INSTALL_OPTS_WEB@
+ COMMAND_OPTS=@COMMAND_OPTS@
+-STRIP=@STRIP@
+
+ CGIEXTRAS=@CGIEXTRAS@
+
+@@ -185,22 +184,8 @@
+ devclean: distclean
+
+ install:
+- $(MAKE) install-basic
+- $(MAKE) strip-post-install
|