Re: [Nagios-devel] Nagios 3 (CVS 10282006) compile error if EPN is
Posted: Mon Oct 30, 2006 2:27 am
Am Samstag, 28. Oktober 2006 20:04 schrieb Joerg Linge:
> Am Samstag, 28. Oktober 2006 19:43 schrieb Joerg Linge:
> > Hi Ethan, hi List
> >
> > the latest CVS HEAD does not compile with --enable-embedded-perl
>
> [...]
>
> Here is a possible Patch
>
> "make all" returns no errors. I will check the function tomorrow
[...]
Next try ....
With the first patch Nagios will compile but i get a SIGSEV after 2 secounds
Now the function works correct. ePN can now be disabled per plugin.
J=F6rg
diff -u nagios-cvs/base/utils.c nagios-cvs-fixed/base/utils.c
=2D-- nagios-cvs/base/utils.c 2006-10-28 00:51:26.000000000 +0200
+++ nagios-cvs-fixed/base/utils.c 2006-10-30 11:21:31.000000000 +0100
@@ -2401,6 +2401,7 @@
STRLEN n_a ;
char *perl_output;
int count;
+ int is_perl=3DFALSE;
int use_epn=3DFALSE;
#ifdef aTHX
dTHX;
@@ -4943,7 +4944,6 @@
char line1[80]=3D"";
char line2[80]=3D"";
int is_perl=3DFALSE;
=2D int use_epn=3DFALSE;
int found_epn_directive=3DFALSE;
if(enable_embedded_perl=3D=3DTRUE){
@@ -4958,15 +4958,15 @@
/* yep, its a Perl script... */
if(strstr(line1,"/bin/perl")!=3DNULL){
=2D isperl=3DTRUE;
+ is_perl=3DTRUE;
/* second line MAY tell us explicity whethe=
r=20
or not to use embedded Perl */
if(fgets(line2,80,fp)){
=2D if(strstr(buffer,"#USE_EPN")=3D=
=3Dbuffer){
+ if(strstr(line2,"#USE_EPN")!=3DNULL=
){
use_epn=3DTRUE;
found_epn_directive=3DTRUE;
}
=2D else=20
if(strstr(buffer,"#NO_EPN")=3D=3Dbuffer){
+ else if(strstr(line2,"#NO_EPN")!=3D=
NULL)
{
use_epn=3DFALSE;
found_epn_directive=3DTRUE;
}
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> Am Samstag, 28. Oktober 2006 19:43 schrieb Joerg Linge:
> > Hi Ethan, hi List
> >
> > the latest CVS HEAD does not compile with --enable-embedded-perl
>
> [...]
>
> Here is a possible Patch
>
> "make all" returns no errors. I will check the function tomorrow
[...]
Next try ....
With the first patch Nagios will compile but i get a SIGSEV after 2 secounds
Now the function works correct. ePN can now be disabled per plugin.
J=F6rg
diff -u nagios-cvs/base/utils.c nagios-cvs-fixed/base/utils.c
=2D-- nagios-cvs/base/utils.c 2006-10-28 00:51:26.000000000 +0200
+++ nagios-cvs-fixed/base/utils.c 2006-10-30 11:21:31.000000000 +0100
@@ -2401,6 +2401,7 @@
STRLEN n_a ;
char *perl_output;
int count;
+ int is_perl=3DFALSE;
int use_epn=3DFALSE;
#ifdef aTHX
dTHX;
@@ -4943,7 +4944,6 @@
char line1[80]=3D"";
char line2[80]=3D"";
int is_perl=3DFALSE;
=2D int use_epn=3DFALSE;
int found_epn_directive=3DFALSE;
if(enable_embedded_perl=3D=3DTRUE){
@@ -4958,15 +4958,15 @@
/* yep, its a Perl script... */
if(strstr(line1,"/bin/perl")!=3DNULL){
=2D isperl=3DTRUE;
+ is_perl=3DTRUE;
/* second line MAY tell us explicity whethe=
r=20
or not to use embedded Perl */
if(fgets(line2,80,fp)){
=2D if(strstr(buffer,"#USE_EPN")=3D=
=3Dbuffer){
+ if(strstr(line2,"#USE_EPN")!=3DNULL=
){
use_epn=3DTRUE;
found_epn_directive=3DTRUE;
}
=2D else=20
if(strstr(buffer,"#NO_EPN")=3D=3Dbuffer){
+ else if(strstr(line2,"#NO_EPN")!=3D=
NULL)
{
use_epn=3DFALSE;
found_epn_directive=3DTRUE;
}
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]