Title: [opsview-base] [265] Make change to host notifications (in addition to service notifications)
- Revision
- 265
- Author
- tvoon
- Date
- 2013-05-28 22:29:30 +0100 (Tue, 28 May 2013)
Log Message
Make change to host notifications (in addition to service notifications)
Modified Paths
Modified: trunk/patches/nagios_contactgrouplist_macro.patch
===================================================================
--- trunk/patches/nagios_contactgrouplist_macro.patch 2013-05-28 20:36:13 UTC (rev 264)
+++ trunk/patches/nagios_contactgrouplist_macro.patch 2013-05-28 21:29:30 UTC (rev 265)
@@ -1,6 +1,6 @@
diff -ur nagios-4.0.20130107.orig/base/notifications.c nagios-4.0.20130107/base/notifications.c
--- nagios-4.0.20130107.orig/base/notifications.c 2013-05-23 02:11:59.000000000 +0000
-+++ nagios-4.0.20130107/base/notifications.c 2013-05-23 02:12:44.000000000 +0000
++++ nagios-4.0.20130107/base/notifications.c 2013-05-23 03:03:39.000000000 +0000
@@ -64,6 +64,10 @@
int increment_notification_number = FALSE;
nagios_macros mac;
@@ -54,7 +54,7 @@
/* get the current time */
time(¤t_time);
-@@ -1172,6 +1197,23 @@
+@@ -1172,6 +1197,22 @@
/* set the notification id macro */
asprintf(&mac.x[MACRO_HOSTNOTIFICATIONID], "%lu", hst->current_notification_id);
@@ -71,16 +71,23 @@
+ first = 0;
+ my_free(temp_buf);
+ }
-+ my_free(mac.x[MACRO_CONTACTGROUPLIST]);
+ mac.x[MACRO_CONTACTGROUPLIST] = (char *)strdup(buf);
+ my_free(buf);
+
/* notify each contact (duplicates have been removed) */
for(temp_notification = notification_list; temp_notification != NULL; temp_notification = temp_notification->next) {
+@@ -1205,6 +1246,7 @@
+ my_free(mac.x[MACRO_HOSTACKAUTHORALIAS]);
+ my_free(mac.x[MACRO_HOSTACKAUTHOR]);
+ my_free(mac.x[MACRO_HOSTACKCOMMENT]);
++ my_free(mac.x[MACRO_CONTACTGROUPLIST]);
+ /* this gets set in add_notification() */
+ my_free(mac.x[MACRO_NOTIFICATIONRECIPIENTS]);
+
diff -ur nagios-4.0.20130107.orig/common/macros.c nagios-4.0.20130107/common/macros.c
--- nagios-4.0.20130107.orig/common/macros.c 2012-12-24 15:29:43.000000000 +0000
-+++ nagios-4.0.20130107/common/macros.c 2013-05-23 02:12:44.000000000 +0000
++++ nagios-4.0.20130107/common/macros.c 2013-05-23 03:02:20.000000000 +0000
@@ -1033,6 +1033,7 @@
case MACRO_NOTIFICATIONAUTHORNAME:
case MACRO_NOTIFICATIONAUTHORALIAS:
@@ -99,7 +106,7 @@
}
diff -ur nagios-4.0.20130107.orig/include/macros.h nagios-4.0.20130107/include/macros.h
--- nagios-4.0.20130107.orig/include/macros.h 2012-12-24 15:29:29.000000000 +0000
-+++ nagios-4.0.20130107/include/macros.h 2013-05-23 02:12:36.000000000 +0000
++++ nagios-4.0.20130107/include/macros.h 2013-05-23 03:02:20.000000000 +0000
@@ -38,7 +38,7 @@
#define MAX_USER_MACROS 256 /* maximum number of $USERx$ macros */
_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins