Bug - xymonnet not correctly checking NOPAGENET
4 Apr
2012
4 Apr
'12
10:52 a.m.
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
5194
Age (days ago)
5194
Last active (days ago)
0 comments
1 participants
participants (1)
-
john.horne@plymouth.ac.uk