Nagios 3 (CVS 10282006) compile error if EPN is enabled

Joerg Linge pitchfork at ederdrom.de
Mon Oct 30 12:27:40 CET 2006


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örg


diff -u nagios-cvs/base/utils.c nagios-cvs-fixed/base/utils.c
--- 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=FALSE;
        int use_epn=FALSE;
 #ifdef aTHX
        dTHX;
@@ -4943,7 +4944,6 @@
        char line1[80]="";
        char line2[80]="";
        int is_perl=FALSE;
-       int use_epn=FALSE;
        int found_epn_directive=FALSE;

        if(enable_embedded_perl==TRUE){
@@ -4958,15 +4958,15 @@
                        /* yep, its a Perl script... */
                        if(strstr(line1,"/bin/perl")!=NULL){

-                               isperl=TRUE;
+                               is_perl=TRUE;

                                /* second line MAY tell us explicity whether 
or not to use embedded Perl */
                                if(fgets(line2,80,fp)){
-                                       if(strstr(buffer,"#USE_EPN")==buffer){
+                                       if(strstr(line2,"#USE_EPN")!=NULL){
                                                use_epn=TRUE;
                                                found_epn_directive=TRUE;
                                                }
-                                       else 
if(strstr(buffer,"#NO_EPN")==buffer){
+                                       else if(strstr(line2,"#NO_EPN")!=NULL)
{
                                                use_epn=FALSE;
                                                found_epn_directive=TRUE;
                                                }

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Developers mailing list