[PATCH 2/2] base/notifications: Handle notified_on properly for hosts

robin.sonefors at op5.com robin.sonefors at op5.com
Thu Nov 29 18:55:00 CET 2012


From: Robin Sonefors <robin.sonefors at op5.com>

All other notified_on code ensures that it doesn't unset the old value,
so there seems to be some kind of trick to that. This place doesn't,
though, so make it use the macro for achieving this task instead.

Signed-off-by: Robin Sonefors <robin.sonefors at op5.com>
---
 base/notifications.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/base/notifications.c b/base/notifications.c
index 2991c28..2dff2ef 100644
--- a/base/notifications.c
+++ b/base/notifications.c
@@ -1218,7 +1218,7 @@ int host_notification(host *hst, int type, char *not_author, char *not_data, int
 				hst->last_notification = current_time;
 
 				/* update notifications flags */
-				hst->notified_on = (1 << hst->current_state);
+				add_notified_on(hst, hst->current_state);
 
 				log_debug_info(DEBUGL_NOTIFICATIONS, 0, "%d contacts were notified.  Next possible notification time: %s", contacts_notified, ctime(&hst->next_notification));
 				}
-- 
1.7.11.7


------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
VERIFY Test and improve your parallel project with help from experts 
and peers. http://goparallel.sourceforge.net




More information about the Developers mailing list