Page 1 of 1

[Nagios-devel] nrpe patch

Posted: Tue Mar 19, 2002 8:39 am
by Guest
Small patch to more descriptively log errors opening nrpe config file
(from "nrpe config errors" thread at nagios-users):


--- nrpe.c Tue Mar 19 15:58:25 2002
+++ nrpe.c.patched Tue Mar 19 15:57:31 2002
@@ -193,8 +193,10 @@
fp=3Dfopen(filename,"r");

/* exit if we couldn't open the config file */
- if(fp=3D=3DNULL)
- return ERROR;
+ if(fp=3D=3DNULL){
+ syslog(LOG_ERR,"unable to open config file '%s'\n",filename);
+ return ERROR;
+ }

line=3D0;
while(fgets(input_buffer,MAX_INPUT_BUFFER-1,fp)){






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