[Xymon] combo.cfg: integer arithmetic and comparisons broken

Andy Smith abs at shadymint.com
Sun Oct 11 14:19:15 CEST 2015


All,

It seems that since revision 7092, this construction mentioned in the 
man pages no longer works:-

	WebCluster.http = (Web1.http + Web2.http + Web3.http) >= 2

I think this patch solves the above issue and hasn't adversely affected 
any of our other combo tests :-

diff -c xymond/combostatus.c.FCS xymond/combostatus.c
*** xymond/combostatus.c.FCS    2015-05-13 10:16:32.000000000 -0400
--- xymond/combostatus.c        2015-10-11 07:38:59.000000000 -0400
***************
*** 287,293 ****

         done = 0; inp=symbolicexpr; outp=expr; symp = NULL;
         while (!done) {
!               if (isalpha((int)*inp) || (isdigit((int)*inp) && 
*(inp+1) && (*(inp+1) > ' ') && *(inp+2) && (*(inp+2) > ' ')) ) { 
/* puke */
                         if (!insymbol) { insymbol = 1; symp = symbol; }
                         *symp = *inp; symp++;
                 }
--- 287,293 ----

         done = 0; inp=symbolicexpr; outp=expr; symp = NULL;
         while (!done) {
!               if (isalpha((int)*inp) || (isdigit((int)*inp) && 
insymbol && *(inp+1) && (*(inp+1) > ' ') && *(inp+2) && (*(inp+2) > ' 
')) ) {  /* puke */
                         if (!insymbol) { insymbol = 1; symp = symbol; }
                         *symp = *inp; symp++;
                 }

Thanks
-- 
Andy



More information about the Xymon mailing list