Title: [opsview-base] [279] Fixed loss of notifications sent per host/service, when a reload occurs
Revision
279
Author
tvoon
Date
2013-06-12 00:25:07 +0100 (Wed, 12 Jun 2013)

Log Message

Fixed loss of notifications sent per host/service, when a reload occurs

Modified Paths

Added Paths

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2013-06-11 13:54:49 UTC (rev 278)
+++ trunk/Makefile	2013-06-11 23:25:07 UTC (rev 279)
@@ -646,6 +646,7 @@
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_missing_host_variable_reset.patch
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_max_concurrent_decrements.patch
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_passive_host_svc_checks_and_host_svc_event_handlers.patch
+	cd ${NAGIOS} && patch -p1 < ../patches/nagios_fix_notifications_in_retention.patch
 	if [ $(KERNEL_NAME) = Linux ] ; then \
 		cd ${NAGIOS} && CFLAGS="${CFLAGS}" ./configure --with-nagios-user=$(NAGIOS_USER) --with-nagios-group=$(NAGIOS_GROUP) --with-command-group=$(NAGIOS_GROUP) --with-cgiurl=/cgi-bin --with-htmurl=/ --enable-libtap ; \
 	elif [ $(KERNEL_NAME) = Darwin ] ; then \

Added: trunk/patches/nagios_fix_notifications_in_retention.patch
===================================================================
--- trunk/patches/nagios_fix_notifications_in_retention.patch	                        (rev 0)
+++ trunk/patches/nagios_fix_notifications_in_retention.patch	2013-06-11 23:25:07 UTC (rev 279)
@@ -0,0 +1,30 @@
+diff -ur nagios-4.0.20130107.original/xdata/xrddefault.c nagios-4.0.20130107/xdata/xrddefault.c
+--- nagios-4.0.20130107.original/xdata/xrddefault.c	2013-06-11 12:13:33.000000000 +0000
++++ nagios-4.0.20130107/xdata/xrddefault.c	2013-06-11 23:22:32.000000000 +0000
+@@ -1227,9 +1227,9 @@
+ 							else if(!strcmp(var, "last_time_unreachable"))
+ 								temp_host->last_time_unreachable = strtoul(val, NULL, 10);
+ 							else if(!strcmp(var, "notified_on_down"))
+-								temp_host->notified_on |= (atoi(val) > 0 ? 1 : 0) << OPT_DOWN;
++								temp_host->notified_on |= (atoi(val) > 0 ? OPT_DOWN : 0);
+ 							else if(!strcmp(var, "notified_on_unreachable"))
+-								temp_host->notified_on |= (atoi(val) > 0 ? 1 : 0) << OPT_UNREACHABLE;
++								temp_host->notified_on |= (atoi(val) > 0 ? OPT_UNREACHABLE : 0);
+ 							else if(!strcmp(var, "last_notification"))
+ 								temp_host->last_notification = strtoul(val, NULL, 10);
+ 							else if(!strcmp(var, "current_notification_number"))
+@@ -1501,11 +1501,11 @@
+ 									temp_service->check_options = atoi(val);
+ 								}
+ 							else if(!strcmp(var, "notified_on_unknown"))
+-								temp_service->notified_on |= ((atoi(val) > 0) ? 1 : 0) << OPT_UNKNOWN;
++								temp_service->notified_on |= ((atoi(val) > 0) ? OPT_UNKNOWN : 0);
+ 							else if(!strcmp(var, "notified_on_warning"))
+-								temp_service->notified_on |= ((atoi(val) > 0) ? 0 : 1) << OPT_WARNING;
++								temp_service->notified_on |= ((atoi(val) > 0) ? OPT_WARNING : 0);
+ 							else if(!strcmp(var, "notified_on_critical"))
+-								temp_service->notified_on = ((atoi(val) > 0) ? 0 : 1) << OPT_CRITICAL;
++								temp_service->notified_on |= ((atoi(val) > 0) ? OPT_CRITICAL : 0);
+ 							else if(!strcmp(var, "current_notification_number"))
+ 								temp_service->current_notification_number = atoi(val);
+ 							else if(!strcmp(var, "current_notification_id"))

_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to