xodtemplate.c patch

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

xodtemplate.c patch

Post by Guest »


-----Original Message-----
From: Clarke, Justin
Sent: Tuesday, March 05, 2002 3:03 PM
To: 'nagios@nagios.org'
Cc: AOD SFIOC
Subject: xodtemplate.c patch


Ethan,
In the template-based object definition processing code for
contacts, the functionality for "n" on host_notification_options and
service_notification_options wasn't actually implemented. Here's the diff
for xodtemplate.c to make it work.


Thanks.

-Justin Clarke


[nagios@sfmgmt01 nagios-1.0a6]$ diff -c xdata/xodtemplate.c.orig
xdata/xodtemplate.c
*** xdata/xodtemplate.c.orig Mon Feb 25 20:04:10 2002
--- xdata/xodtemplate.c Tue Mar 5 14:59:50 2002
***************
*** 1900,1905 ****
--- 1900,1910 ----

temp_contact->notify_on_host_unreachable=TRUE;
else if(!strcmp(temp_ptr,"r") ||
!strcmp(temp_ptr,"recovery"))

temp_contact->notify_on_host_recovery=TRUE;
+ else if(!strcmp(temp_ptr,"n") ||
!strcmp(temp_ptr,"none")){
+
temp_contact->notify_on_host_down=FALSE;
+
temp_contact->notify_on_host_unreachable=FALSE;
+
temp_contact->notify_on_host_recovery=FALSE;
+ }
else{
#ifdef NSCORE
printf("Error: Invalid host
notification option '%s' in contact definition.\n",temp_ptr);
***************
*** 1919,1924 ****
--- 1924,1935 ----

temp_contact->notify_on_service_critical=TRUE;
else if(!strcmp(temp_ptr,"r") ||
!strcmp(temp_ptr,"recovery"))

temp_contact->notify_on_service_recovery=TRUE;
+ else if(!strcmp(temp_ptr,"n") ||
!strcmp(temp_ptr,"none")){
+
temp_contact->notify_on_service_unknown=FALSE;
+
temp_contact->notify_on_service_warning=FALSE;
+
temp_contact->notify_on_service_critical=FALSE;
+
temp_contact->notify_on_service_recovery=FALSE;
+ }
else{
#ifdef NSCORE
printf("Error: Invalid service
notification option '%s' in contact definition.\n",temp_ptr);





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: larke, Justi
Locked