Title: [opsview-base] [247] Merged US539 branch.
Revision
247
Author
pknight
Date
2013-04-25 12:00:58 +0100 (Thu, 25 Apr 2013)

Log Message

Merged US539 branch.

Modified Paths


Removed Paths

Property Changed


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/BRAN-4.2:152
/branches/BRAN-4.3:54-62,237
/branches/DEV-Nagios_4:63-125
/branches/DEV-Nagios_4-will_need_to_merge:77-148
/branches/nagvis-iframe:33
   + /branches/BRAN-4.2:152
/branches/BRAN-4.3:54-62,237
/branches/DEV-Nagios_4:63-125
/branches/DEV-Nagios_4-will_need_to_merge:77-148
/branches/US539:243-246
/branches/nagvis-iframe:33

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2013-04-25 10:03:40 UTC (rev 246)
+++ trunk/Makefile	2013-04-25 11:00:58 UTC (rev 247)
@@ -491,8 +491,6 @@
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_is_active_with_renotification_interval.patch
 	# # Disabling patch below. This seems to affect multiple callbacks
 	# #cd ${NAGIOS} && patch -p1 < ../patches/nagios_retain_broker_module_order.patch
-	# # Below is a test patch due to changes to object structures for contacts
-	cd ${NAGIOS} && patch -p1 < ../patches/nagios_test_configuration_expected.patch
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_save_processed_command.patch
 	# # All 3 below will be in Nagios 3.2.4+
 	# cd ${NAGIOS} && patch -p0 < ../patches/nagios_cgiutils.patch


Property changes on: trunk/patches/nagios_bugfix_2576.patch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /branches/US539/patches/nagios_bugfix_2576.patch:243-246

Modified: trunk/patches/nagios_notification_level.patch
===================================================================
--- trunk/patches/nagios_notification_level.patch	2013-04-25 10:03:40 UTC (rev 246)
+++ trunk/patches/nagios_notification_level.patch	2013-04-25 11:00:58 UTC (rev 247)
@@ -1,6 +1,6 @@
-diff -ur nagios-4.0.20121205.original//base/broker.c nagios-4.0.20121205/base/broker.c
---- nagios-4.0.20121205.original//base/broker.c	2012-11-16 12:38:07.000000000 +0000
-+++ nagios-4.0.20121205/base/broker.c	2012-12-22 04:52:00.000000000 +0000
+diff -Bbur nagios-4.0.20130107.orig/base/broker.c nagios-4.0.20130107/base/broker.c
+--- nagios-4.0.20130107.orig/base/broker.c	2012-12-24 15:29:58.000000000 +0000
++++ nagios-4.0.20130107/base/broker.c	2013-04-24 17:01:12.000000000 +0000
 @@ -581,6 +581,7 @@
  		ds.service_description = temp_service->description;
  		ds.state = temp_service->current_state;
@@ -17,10 +17,10 @@
  		}
  	ds.object_ptr = data;
  	ds.ack_author = ack_author;
-diff -ur nagios-4.0.20121205.original//base/notifications.c nagios-4.0.20121205/base/notifications.c
---- nagios-4.0.20121205.original//base/notifications.c	2012-12-05 00:02:16.000000000 +0000
-+++ nagios-4.0.20121205/base/notifications.c	2012-12-22 04:52:00.000000000 +0000
-@@ -588,6 +588,7 @@
+diff -Bbur nagios-4.0.20130107.orig/base/notifications.c nagios-4.0.20130107/base/notifications.c
+--- nagios-4.0.20130107.orig/base/notifications.c	2012-12-24 15:29:58.000000000 +0000
++++ nagios-4.0.20130107/base/notifications.c	2013-04-24 17:01:12.000000000 +0000
+@@ -581,6 +581,7 @@
  
  /* check viability of sending out a service notification to a specific contact (contact-specific filters) */
  int check_contact_service_notification_viability(contact *cntct, service *svc, int type, int options) {
@@ -28,7 +28,7 @@
  
  	log_debug_info(DEBUGL_FUNCTIONS, 0, "check_contact_service_notification_viability()\n");
  
-@@ -658,6 +659,17 @@
+@@ -651,6 +652,21 @@
  	/*** ACKS AND NORMAL NOTIFICATIONS ***/
  	/*************************************/
  
@@ -38,15 +38,19 @@
 +		notification_number = svc->current_notification_number - 1;
 +	else
 +		notification_number=svc->current_notification_number;
-+	if(notification_number < cntct->notification_level) {
-+		log_debug_info(DEBUGL_NOTIFICATIONS,2,"This contact's notification_level %d is greater than the current notification number %d\n", cntct->notification_level, notification_number);
++	if(notification_number < cntct->notification_level_start) {
++		log_debug_info(DEBUGL_NOTIFICATIONS,2,"This contact's notification_level_start %d is greater than the current notification number %d\n", cntct->notification_level_start, notification_number);
 +		return ERROR;
 +		}
++	if(notification_number > cntct->notification_level_stop) {
++		log_debug_info(DEBUGL_NOTIFICATIONS,2,"This contact's notification_level_stop %d is less than the current notification number %d\n", cntct->notification_level_stop, notification_number);
++		return ERROR;
++		}
 +
  	/* see if we should notify about problems with this service */
  	if(!(cntct->service_notification_options & (1 << svc->current_state))) {
  		log_debug_info(DEBUGL_NOTIFICATIONS, 2, "We shouldn't notify this contact about %s service states.\n", service_state_name(svc->current_state));
-@@ -1494,6 +1506,7 @@
+@@ -1482,6 +1498,7 @@
  
  /* checks the viability of notifying a specific contact about a host */
  int check_contact_host_notification_viability(contact *cntct, host *hst, int type, int options) {
@@ -54,7 +58,7 @@
  
  	log_debug_info(DEBUGL_FUNCTIONS, 0, "check_contact_host_notification_viability()\n");
  
-@@ -1517,6 +1530,16 @@
+@@ -1505,6 +1522,20 @@
  		return ERROR;
  		}
  
@@ -63,45 +67,51 @@
 +		notification_number = hst->current_notification_number - 1;
 +	else
 +		notification_number=hst->current_notification_number;
-+	if(notification_number < cntct->notification_level) {
-+		log_debug_info(DEBUGL_NOTIFICATIONS,2,"This contact's notification_level %d is greater than the current notification number %d\n", cntct->notification_level, notification_number);
++	if(notification_number < cntct->notification_level_start) {
++		log_debug_info(DEBUGL_NOTIFICATIONS,2,"This contact's notification_level_start %d is greater than the current notification number %d\n", cntct->notification_level_start, notification_number);
 +		return ERROR;
 +		}
++	if(notification_number > cntct->notification_level_stop) {
++		log_debug_info(DEBUGL_NOTIFICATIONS,2,"This contact's notification_level_stop %d is less than the current notification number %d\n", cntct->notification_level_stop, notification_number);
++		return ERROR;
++		}
 +
  	/* see if the contact can be notified at this time */
  	if(check_time_against_period(time(NULL), cntct->host_notification_period_ptr) == ERROR) {
  		log_debug_info(DEBUGL_NOTIFICATIONS, 2, "This contact shouldn't be notified at this time.\n");
-diff -ur nagios-4.0.20121205.original//common/objects.c nagios-4.0.20121205/common/objects.c
---- nagios-4.0.20121205.original//common/objects.c	2012-12-22 04:51:22.000000000 +0000
-+++ nagios-4.0.20121205/common/objects.c	2012-12-22 04:52:00.000000000 +0000
+diff -Bbur nagios-4.0.20130107.orig/common/objects.c nagios-4.0.20130107/common/objects.c
+--- nagios-4.0.20130107.orig/common/objects.c	2013-04-24 17:00:47.000000000 +0000
++++ nagios-4.0.20130107/common/objects.c	2013-04-24 17:01:12.000000000 +0000
 @@ -1215,7 +1215,7 @@
  
  
  /* add a new contact to the list in memory */
 -contact *add_contact(char *name, char *alias, char *email, char *pager, char **addresses, char *svc_notification_period, char *host_notification_period, int service_notification_options, int host_notification_options, int host_notifications_enabled, int service_notifications_enabled, int can_submit_commands, int retain_status_information, int retain_nonstatus_information, unsigned int minimum_value) {
-+contact *add_contact(char *name, char *alias, char *email, char *pager, char **addresses, char *svc_notification_period, char *host_notification_period, int service_notification_options, int host_notification_options, int host_notifications_enabled, int service_notifications_enabled, int can_submit_commands, int retain_status_information, int retain_nonstatus_information, unsigned int minimum_value, int notification_level) {
++contact *add_contact(char *name, char *alias, char *email, char *pager, char **addresses, char *svc_notification_period, char *host_notification_period, int service_notification_options, int host_notification_options, int host_notifications_enabled, int service_notifications_enabled, int can_submit_commands, int retain_status_information, int retain_nonstatus_information, unsigned int minimum_value, int notification_level_start, int notification_level_stop) {
  	contact *new_contact = NULL;
  	timeperiod *htp = NULL, *stp = NULL;
  	int x = 0;
-@@ -1270,6 +1271,7 @@
+@@ -1270,6 +1270,8 @@
  		}
  
  	new_contact->minimum_value = minimum_value;
-+	new_contact->notification_level = notification_level;
++	new_contact->notification_level_start = notification_level_start;
++	new_contact->notification_level_stop = notification_level_stop;
  	new_contact->service_notification_options = service_notification_options;
  	new_contact->host_notification_options = host_notification_options;
  	new_contact->host_notifications_enabled = (host_notifications_enabled > 0) ? TRUE : FALSE;
-@@ -3235,6 +3243,7 @@
+@@ -3234,6 +3236,8 @@
  	fprintf(fp, "\thost_notifications_enabled\t%d\n", temp_contact->host_notifications_enabled);
  	fprintf(fp, "\tservice_notifications_enabled\t%d\n", temp_contact->service_notifications_enabled);
  	fprintf(fp, "\tcan_submit_commands\t%d\n", temp_contact->can_submit_commands);
-+	fprintf(fp, "\tnotification_level\t%d\n", temp_contact->notification_level);
++	fprintf(fp, "\tnotification_level_start\t%d\n", temp_contact->notification_level_start);
++	fprintf(fp, "\tnotification_level_stop\t%d\n", temp_contact->notification_level_stop);
  	fprintf(fp, "\tretain_status_information\t%d\n", temp_contact->retain_status_information);
  	fprintf(fp, "\tretain_nonstatus_information\t%d\n", temp_contact->retain_nonstatus_information);
  
-diff -ur nagios-4.0.20121205.original//include/nebstructs.h nagios-4.0.20121205/include/nebstructs.h
---- nagios-4.0.20121205.original//include/nebstructs.h	2012-11-16 12:38:06.000000000 +0000
-+++ nagios-4.0.20121205/include/nebstructs.h	2012-12-22 04:52:00.000000000 +0000
+diff -Bbur nagios-4.0.20130107.orig/include/nebstructs.h nagios-4.0.20130107/include/nebstructs.h
+--- nagios-4.0.20130107.orig/include/nebstructs.h	2012-12-24 15:29:29.000000000 +0000
++++ nagios-4.0.20130107/include/nebstructs.h	2013-04-24 17:01:12.000000000 +0000
 @@ -326,6 +326,7 @@
  	char            *ack_data;
  	int             escalated;
@@ -110,82 +120,92 @@
  
  	void            *object_ptr;
  	} nebstruct_notification_data;
-diff -ur nagios-4.0.20121205.original//include/objects.h nagios-4.0.20121205/include/objects.h
---- nagios-4.0.20121205.original//include/objects.h	2012-12-22 04:51:22.000000000 +0000
-+++ nagios-4.0.20121205/include/objects.h	2012-12-22 04:52:00.000000000 +0000
-@@ -351,6 +351,7 @@
+diff -Bbur nagios-4.0.20130107.orig/include/objects.h nagios-4.0.20130107/include/objects.h
+--- nagios-4.0.20130107.orig/include/objects.h	2013-04-24 17:00:47.000000000 +0000
++++ nagios-4.0.20130107/include/objects.h	2013-04-24 17:03:06.000000000 +0000
+@@ -351,6 +351,8 @@
  	int     host_notifications_enabled;
  	int     service_notifications_enabled;
  	int     can_submit_commands;
-+	int	    notification_level;
++	int	    notification_level_start;
++	int	    notification_level_stop;
  	int     retain_status_information;
  	int     retain_nonstatus_information;
  	struct customvariablesmember *custom_variables;
-@@ -766,7 +767,7 @@
+@@ -766,7 +768,7 @@
  
  
  /**** Object Creation Functions ****/
 -struct contact *add_contact(char *name, char *alias, char *email, char *pager, char **addresses, char *svc_notification_period, char *host_notification_period, int service_notification_options, int host_notification_options, int service_notifications_enabled, int host_notifications_enabled, int can_submit_commands, int retain_status_information, int retain_nonstatus_information, unsigned int minimum_value);
-+struct contact *add_contact(char *name, char *alias, char *email, char *pager, char **addresses, char *svc_notification_period, char *host_notification_period, int service_notification_options, int host_notification_options, int service_notifications_enabled, int host_notifications_enabled, int can_submit_commands, int retain_status_information, int retain_nonstatus_information, unsigned int minimum_value, int notification_level);
++struct contact *add_contact(char *name, char *alias, char *email, char *pager, char **addresses, char *svc_notification_period, char *host_notification_period, int service_notification_options, int host_notification_options, int service_notifications_enabled, int host_notifications_enabled, int can_submit_commands, int retain_status_information, int retain_nonstatus_information, unsigned int minimum_value, int notification_level_start, int notification_level_stop);
  struct commandsmember *add_service_notification_command_to_contact(contact *, char *);				/* adds a service notification command to a contact definition */
  struct commandsmember *add_host_notification_command_to_contact(contact *, char *);				/* adds a host notification command to a contact definition */
  struct customvariablesmember *add_custom_variable_to_contact(contact *, char *, char *);                       /* adds a custom variable to a service definition */
-diff -ur nagios-4.0.20121205.original//xdata/xodtemplate.c nagios-4.0.20121205/xdata/xodtemplate.c
---- nagios-4.0.20121205.original//xdata/xodtemplate.c	2012-12-22 04:51:22.000000000 +0000
-+++ nagios-4.0.20121205/xdata/xodtemplate.c	2012-12-22 04:53:47.000000000 +0000
-@@ -960,6 +960,8 @@
+diff -Bbur nagios-4.0.20130107.orig/xdata/xodtemplate.c nagios-4.0.20130107/xdata/xodtemplate.c
+--- nagios-4.0.20130107.orig/xdata/xodtemplate.c	2013-04-24 17:00:47.000000000 +0000
++++ nagios-4.0.20130107/xdata/xodtemplate.c	2013-04-24 17:01:12.000000000 +0000
+@@ -964,6 +964,10 @@
  			new_contact->host_notifications_enabled = TRUE;
  			new_contact->service_notifications_enabled = TRUE;
  			new_contact->can_submit_commands = TRUE;
-+			new_contact->notification_level = 1;
-+			new_contact->have_notification_level = FALSE;
++			new_contact->notification_level_start = 1;
++			new_contact->have_notification_level_start = FALSE;
++			new_contact->notification_level_stop = 0;
++			new_contact->have_notification_level_stop = FALSE;
  			new_contact->retain_status_information = TRUE;
  			new_contact->retain_nonstatus_information = TRUE;
  			break;
-@@ -2112,6 +2114,10 @@
+@@ -2116,6 +2120,14 @@
  				temp_contact->can_submit_commands = (atoi(value) > 0) ? TRUE : FALSE;
  				temp_contact->have_can_submit_commands = TRUE;
  				}
-+			else if(!strcmp(variable,"notification_level")) {
-+				temp_contact->notification_level = atoi(value);
-+				temp_contact->have_notification_level = TRUE;
++			else if(!strcmp(variable,"notification_level_start")) {
++				temp_contact->notification_level_start = atoi(value);
++				temp_contact->have_notification_level_start = TRUE;
 +		        }
++			else if(!strcmp(variable,"notification_level_stop")) {
++				temp_contact->notification_level_stop = atoi(value);
++				temp_contact->have_notification_level_stop = TRUE;
++		        }
  			else if(!strcmp(variable, "retain_status_information")) {
  				temp_contact->retain_status_information = (atoi(value) > 0) ? TRUE : FALSE;
  				temp_contact->have_retain_status_information = TRUE;
-@@ -5472,6 +5478,7 @@
+@@ -5476,6 +5488,8 @@
  		xod_inherit(this_contact, template_contact, retain_status_information);
  		xod_inherit(this_contact, template_contact, retain_nonstatus_information);
  		xod_inherit(this_contact, template_contact, minimum_value);
-+		xod_inherit(this_contact, template_contact, notification_level);
++		xod_inherit(this_contact, template_contact, notification_level_start);
++		xod_inherit(this_contact, template_contact, notification_level_stop);
  
  		/* apply missing custom variables from template contact... */
  		for(temp_customvariablesmember = template_contact->custom_variables; temp_customvariablesmember != NULL; temp_customvariablesmember = temp_customvariablesmember->next) {
-@@ -7357,7 +7364,7 @@
+@@ -7373,7 +7387,7 @@
  		return OK;
  
  	/* add the contact */
 -	new_contact = add_contact(this_contact->contact_name, this_contact->alias, this_contact->email, this_contact->pager, this_contact->address, this_contact->service_notification_period, this_contact->host_notification_period, this_contact->service_notification_options, this_contact->host_notification_options, this_contact->host_notifications_enabled, this_contact->service_notifications_enabled, this_contact->can_submit_commands, this_contact->retain_status_information, this_contact->retain_nonstatus_information, this_contact->minimum_value);
-+	new_contact = add_contact(this_contact->contact_name, this_contact->alias, this_contact->email, this_contact->pager, this_contact->address, this_contact->service_notification_period, this_contact->host_notification_period, this_contact->service_notification_options, this_contact->host_notification_options, this_contact->host_notifications_enabled, this_contact->service_notifications_enabled, this_contact->can_submit_commands, this_contact->retain_status_information, this_contact->retain_nonstatus_information, this_contact->minimum_value, this_contact->notification_level);
++	new_contact = add_contact(this_contact->contact_name, this_contact->alias, this_contact->email, this_contact->pager, this_contact->address, this_contact->service_notification_period, this_contact->host_notification_period, this_contact->service_notification_options, this_contact->host_notification_options, this_contact->host_notifications_enabled, this_contact->service_notifications_enabled, this_contact->can_submit_commands, this_contact->retain_status_information, this_contact->retain_nonstatus_information, this_contact->minimum_value, this_contact->notification_level_start, this_contact->notification_level_stop);
  
  	/* return with an error if we couldn't add the contact */
  	if(new_contact == NULL) {
-diff -ur nagios-4.0.20121205.original//xdata/xodtemplate.h nagios-4.0.20121205/xdata/xodtemplate.h
---- nagios-4.0.20121205.original//xdata/xodtemplate.h	2012-12-22 04:51:22.000000000 +0000
-+++ nagios-4.0.20121205/xdata/xodtemplate.h	2012-12-22 04:52:00.000000000 +0000
-@@ -146,6 +146,7 @@
+diff -Bbur nagios-4.0.20130107.orig/xdata/xodtemplate.h nagios-4.0.20130107/xdata/xodtemplate.h
+--- nagios-4.0.20130107.orig/xdata/xodtemplate.h	2013-04-24 17:00:47.000000000 +0000
++++ nagios-4.0.20130107/xdata/xodtemplate.h	2013-04-24 17:01:12.000000000 +0000
+@@ -146,6 +146,8 @@
      int       host_notifications_enabled;
      int       service_notifications_enabled;
      int       can_submit_commands;
-+	int       notification_level;
++	int       notification_level_start;
++	int       notification_level_stop;
      int       retain_status_information;
      int       retain_nonstatus_information;
      unsigned int minimum_value;
-@@ -165,6 +166,7 @@
+@@ -165,6 +167,8 @@
      char have_host_notifications_enabled;
      char have_service_notifications_enabled;
      char have_can_submit_commands;
-+	unsigned have_notification_level : 1;
++	unsigned have_notification_level_start : 1;
++	unsigned have_notification_level_stop : 1;
      char have_retain_status_information;
      char have_retain_nonstatus_information;
      unsigned have_minimum_value : 1;

Deleted: trunk/patches/nagios_test_configuration_expected.patch
===================================================================
--- trunk/patches/nagios_test_configuration_expected.patch	2013-04-25 10:03:40 UTC (rev 246)
+++ trunk/patches/nagios_test_configuration_expected.patch	2013-04-25 11:00:58 UTC (rev 247)
@@ -1,19 +0,0 @@
-diff -Bbur nagios-4.0.20121116.orig/t/var/objects.precache.expected nagios-4.0.20121116/t/var/objects.precache.expected
---- nagios-4.0.20121116.orig/t/var/objects.precache.expected	2012-11-26 14:18:49.000000000 +0000
-+++ nagios-4.0.20121116/t/var/objects.precache.expected	2012-11-27 10:19:19.000000000 +0000
-@@ -70,6 +70,7 @@
- 	host_notifications_enabled	0
- 	service_notifications_enabled	0
- 	can_submit_commands	1
-+	notification_level	1
- 	retain_status_information	1
- 	retain_nonstatus_information	1
- 	}
-@@ -85,6 +86,7 @@
- 	host_notifications_enabled	0
- 	service_notifications_enabled	0
- 	can_submit_commands	1
-+	notification_level	1
- 	retain_status_information	1
- 	retain_nonstatus_information	1
- 	}

Modified: trunk/patches/ndoutils_notification_level.patch
===================================================================
--- trunk/patches/ndoutils_notification_level.patch	2013-04-25 10:03:40 UTC (rev 246)
+++ trunk/patches/ndoutils_notification_level.patch	2013-04-25 11:00:58 UTC (rev 247)
@@ -1,11 +1,12 @@
 diff -Bbur ndoutils-2-0.orig/include/nagios-4x/objects.h ndoutils-2-0/include/nagios-4x/objects.h
---- ndoutils-2-0.orig/include/nagios-4x/objects.h	2012-11-27 15:27:54.000000000 +0000
-+++ ndoutils-2-0/include/nagios-4x/objects.h	2012-11-27 15:40:54.000000000 +0000
-@@ -351,6 +351,7 @@
+--- ndoutils-2-0.orig/include/nagios-4x/objects.h	2013-04-25 09:55:23.000000000 +0000
++++ ndoutils-2-0/include/nagios-4x/objects.h	2013-04-25 09:56:13.000000000 +0000
+@@ -351,6 +351,8 @@
  	int     host_notifications_enabled;
  	int     service_notifications_enabled;
  	int     can_submit_commands;
-+	int	    notification_level;
++	int	    notification_level_start;
++	int	    notification_level_stop;
  	int     retain_status_information;
  	int     retain_nonstatus_information;
  	struct customvariablesmember *custom_variables;

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

Reply via email to