[Nagios-devel] [core] config file parsing: check end of definition

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

[Nagios-devel] [core] config file parsing: check end of definition

Post by Guest »


--wac7ysb48OaltWcw
Content-Type: text/plain; charset*=utf-8''%E2%80%9Cus-ascii
Content-Disposition: inline

Attached patch fixes some unreachable code for detecting the end of a 'define'.
Currently there are two check for it right after each other. The first one can
be removed...

-Marcel
--
======-------- Marcel J.E. Mol MESA Consulting B.V.
=======--------- ph. +31-(0)6-54724868 P.O. Box 112
=======--------- [email protected] 2630 AC Nootdorp
__==== www.mesa.nl ---____U_n_i_x______I_n_t_e_r_n_e_t____ The Netherlands ____
They couldn't think of a number, Linux user 1148 -- counter.li.org
so they gave me a name! -- Rupert Hine -- www.ruperthine.com

--wac7ysb48OaltWcw
Content-Type: text/plain; charset*=utf-8''%E2%80%9Cus-ascii
Content-Disposition: attachment; filename="xodtemplate.dif"

--- org/nagios-HEAD/xdata/xodtemplate.c 2010-03-29 16:51:38.000000000 +0200
+++ nagios-HEAD/xdata/xodtemplate.c 2010-10-14 19:50:18.681571847 +0200
@@ -755,21 +755,6 @@
in_definition=TRUE;
}

- /* this is the close of an object definition */
- else if(!strcmp(input,"}") && in_definition==TRUE){
-
- in_definition=FALSE;
-
- /* close out current definition */
- if(xodtemplate_end_object_definition(options)==ERROR){
-#ifdef NSCORE
- logit(NSLOG_CONFIG_ERROR,TRUE,"Error: Could not complete object definition in file '%s' on line %d.\n",filename,current_line);
-#endif
- result=ERROR;
- break;
- }
- }
-
/* we're currently inside an object definition */
else if(in_definition==TRUE){


--wac7ysb48OaltWcw--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked