Patch for NRPE
Aaron Segura
Aaron.Segura at cabelas.com
Wed Jan 17 16:43:08 CET 2007
No, I just like to rename variables so I can say that I submit patches
to popular open source projects...
:/
Near the top of the source there is already:
#ifdef DEBUG
FILE *errfp
#endif
But no:
FILE *fp
The *errfp var is used in other '#ifdef DEBUG/#endif' blocks, but not
the particular one which I submitted the patch for.
$ export CFLAGS=-DDEBUG
$ make
cd ./src/; make ; cd ..
make[1]: Entering directory `/home/asegura/work/nrpe-2.6/src'
gcc -DDEBUG -I/usr/include/openssl -I/usr/include -DHAVE_CONFIG_H -o
nrpe nrpe.c utils.c -L/usr/lib -lssl -lcrypto -lnsl -lwrap
nrpe.c: In function `handle_connection':
nrpe.c:1053: error: `fp' undeclared (first use in this function)
nrpe.c:1053: error: (Each undeclared identifier is reported only once
nrpe.c:1053: error: for each function it appears in.)
make[1]: *** [nrpe] Error 1
make[1]: Leaving directory `/home/asegura/work/nrpe-2.6/src'
*** Compile finished ***
-----Original Message-----
From: Andreas Ericsson [mailto:ae at op5.se]
Sent: Wednesday, January 17, 2007 2:11 AM
To: Aaron Segura
Cc: Nagios Users mailinglist
Subject: Re: [Nagios-users] Patch for NRPE
Aaron Segura wrote:
> While attempting to compile NRPE (v2.6 / 12/11/2006) with the DEBUG
> option today I think I found a small error in the code and have
included
> a patch to fix it.
>
>
>
> This is for nrpe.c
>
>
>
> 1053,1056c1053,1056
>
> < fp=fopen("/tmp/packet","w");
>
> < if(fp){
>
> < fwrite(&receive_packet,1,sizeof(receive_packet),fp);
>
> < fclose(fp);
>
> ---
>
>> errfp=fopen("/tmp/packet","w");
>
>> if(errfp){
>
>> fwrite(&receive_packet,1,sizeof(receive_packet),errfp);
>
>> fclose(errfp);
>
>
>
> I realize this is the "users" list. Sorry if this is the wrong place
to
> post it.
>
There's no difference what so ever between these two code-snippets. Just
renaming a variable doesn't really warrant a patch, imo. Did you see
some compile-error that made this patch needed?
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list