"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xymond/combostatus.c" between
xymon-4.3.29.tar.gz and xymon-4.3.30.tar.gz

About: Xymon is a system for monitoring servers, applications and networks (like Big Brother; former name "hobbit").

combostatus.c  (xymon-4.3.29):combostatus.c  (xymon-4.3.30)
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* Xymon combination test tool. */ /* Xymon combination test tool. */
/* */ /* */
/* Copyright (C) 2003-2011 Henrik Storner <henrik@hswn.dk> */ /* Copyright (C) 2003-2011 Henrik Storner <henrik@hswn.dk> */
/* */ /* */
/* This program is released under the GNU General Public License (GPL), */ /* This program is released under the GNU General Public License (GPL), */
/* version 2. See the file "COPYING" for details. */ /* version 2. See the file "COPYING" for details. */
/* */ /* */
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
static char rcsid[] = "$Id: combostatus.c 7718 2015-11-03 01:37:39Z jccleaver $" ; static char rcsid[] = "$Id: combostatus.c 8106 2019-09-03 21:46:55Z jccleaver $" ;
#include <limits.h> #include <limits.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <time.h> #include <time.h>
skipping to change at line 254 skipping to change at line 254
char *errptr; char *errptr;
*color = -1; *color = -1;
errptr = errtext; errptr = errtext;
*errptr = '\0'; *errptr = '\0';
/* First check if it is one of our own tests */ /* First check if it is one of our own tests */
for (walk = testhead; (walk && ( (strcmp(walk->reshostname, hostname) != 0) || (strcmp(walk->restestname, testname) != 0) ) ); walk = walk->next); for (walk = testhead; (walk && ( (strcmp(walk->reshostname, hostname) != 0) || (strcmp(walk->restestname, testname) != 0) ) ); walk = walk->next);
if (walk != NULL) { if (walk != NULL) {
/* It is a combo test they want the result of. */ /* It is a combo test they want the result of. */
*color = (walk->result ? COL_GREEN : COL_RED);
return walk->result; return walk->result;
} }
*color = getxymondvalue(hostname, testname, &errptr); *color = getxymondvalue(hostname, testname, &errptr);
/* Save error messages */ /* Save error messages */
if (strlen(errtext) > 0) { if (strlen(errtext) > 0) {
if (*errbuf == NULL) if (*errbuf == NULL)
*errbuf = strdup(errtext); *errbuf = strdup(errtext);
else { else {
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)