[Xymon] Bug - xymonnet not correctly checking NOPAGENET
John Horne
john.horne at plymouth.ac.uk
Wed Apr 4 12:52:06 CEST 2012
Hello,
In Xymon 4.3.7 the xymonnet.c file contains the following code:
====================================
/* If a NOPAGENET service, downgrade RED to YELLOW */
if (color == COL_RED) {
char *nopagename;
/* Check if this service is a NOPAGENET service. */
nopagename = (char *) malloc(strlen(svcname)+3);
sprintf(nopagename, ",%s,", svcname);
if (strstr(nonetpage, svcname) != NULL) color = COL_YELLOW;
xfree(nopagename);
}
====================================
As far as I can see this is incorrect because it sets up 'nopagename'
but then compares 'svcname' against 'nonetpage'. So all the 'nopagename'
code is completely redundant.
I suspect what should happen is:
if (strstr(nonetpage, nopagename) != NULL) color = COL_YELLOW;
This piece of code occurs in two other places - httpresult.c and
ldaptest.c.
Regards,
John.
--
John Horne Tel: +44 (0)1752 587287
Plymouth University, UK Fax: +44 (0)1752 587001
More information about the Xymon
mailing list