[icinga-checkins] icinga.org: icinga-core/master: core: fix first_notification_delay logic ( GalaxyMaster) #1145
git at icinga.org
git at icinga.org
Wed Jan 26 13:15:15 CET 2011
Module: icinga-core
Branch: master
Commit: 83325c643f424a0d854e185003faf827ec00c62c
URL: https://git.icinga.org/?p=icinga-core.git;a=commit;h=83325c643f424a0d854e185003faf827ec00c62c
Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date: Tue Jan 25 14:54:24 2011 +0100
core: fix first_notification_delay logic (GalaxyMaster) #1145
[--SNIP--]
This patch fixes two errors of the same nature: a misplacement of the
closing brace. These errors prevented the first_notification_delay
logic to work. After my patch is applied, the delayed notifications
start to work as expected.
Tested-by: GalaxyMaster <galaxy at openwall.com>
Signed-off-by: Andreas Ericsson <ae at op5.se>
Author: GalaxyMaster <galaxy at openwall.com>
Committer: Andreas Ericsson <ae at op5.se>
[--SNIP--]
fixes #1145
---
Changelog | 1 +
base/notifications.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Changelog b/Changelog
index 90b02bc..b5dedc3 100644
--- a/Changelog
+++ b/Changelog
@@ -72,6 +72,7 @@ FIXES
* core: reduce duplication of code for is_contact_member_of_contactgroup (Stephen Gran) #1126
* core: fix bug with passive host checks being incorrectly sent to event brokers as active checks (Ethan Galstad) #1133
* core: fix bug where passive host check status updates were not being propagated to event brokers (Ethan Galstad) #1134
+* core: fix first_notification_delay logic (GalaxyMaster) #1145
* classic ui: change servicestatus letter color to default black, not grey #946
* classic ui: fix waste of cpu in status summary (TomTom) #933
diff --git a/base/notifications.c b/base/notifications.c
index cc00ff1..41ee182 100644
--- a/base/notifications.c
+++ b/base/notifications.c
@@ -561,7 +561,7 @@ int check_service_notification_viability(service *svc, int type, int options){
if((svc->last_time_critical < first_problem_time) && (svc->last_time_critical > svc->last_time_ok))
first_problem_time=svc->last_time_critical;
- if(current_time < (time_t)((first_problem_time==(time_t)0L)?program_start:first_problem_time + (svc->first_notification_delay*interval_length))){
+ if(current_time < (time_t)((first_problem_time==(time_t)0L)?program_start:first_problem_time) + (time_t)(svc->first_notification_delay*interval_length)){
log_debug_info(DEBUGL_NOTIFICATIONS,1,"Not enough time has elapsed since the service changed to a non-OK state, so we should not notify about this problem yet\n");
return ERROR;
}
@@ -1642,7 +1642,7 @@ int check_host_notification_viability(host *hst, int type, int options){
if((hst->last_time_unreachable < first_problem_time) && (hst->last_time_unreachable > hst->last_time_unreachable))
first_problem_time=hst->last_time_unreachable;
- if(current_time < (time_t)((first_problem_time==(time_t)0L)?program_start:first_problem_time + (hst->first_notification_delay*interval_length))){
+ if(current_time < (time_t)((first_problem_time==(time_t)0L)?program_start:first_problem_time) + (time_t)(hst->first_notification_delay*interval_length)){
log_debug_info(DEBUGL_NOTIFICATIONS,1,"Not enough time has elapsed since the host changed to a non-UP state (or since program start), so we shouldn't notify about this problem yet.\n");
return ERROR;
}
More information about the icinga-checkins
mailing list