Xymon Mailing List Archive search

Alert Config Issues

list Henrik Størner
Mon, 23 May 2005 12:00:36 +0200
Message-Id: <user-631c6288d693@xymon.invalid>

On Mon, May 23, 2005 at 03:49:41PM +1200, Andy France wrote:
I am getting some dead.letter issues as it seems hobbit is mis-reading my
alert config... 
Argh ... so easy to find once you get the right test-case.

The code reading the alert config only handles TAB's at the beginning of
a line, not in the middle of a line.

Patch attached.


Henrik

-------------- next part --------------
--- hobbitd/do_alert.c	2005/05/22 07:31:22	1.65
+++ hobbitd/do_alert.c	2005/05/23 09:59:17
@@ -13,7 +13,7 @@
 /*                                                                            */
 /*----------------------------------------------------------------------------*/
 
-static char rcsid[] = "$Id: do_alert.c,v 1.65 2005/05/22 07:31:22 henrik Exp $";
+static char rcsid[] = "$Id: do_alert.c,v 1.66 2005/05/23 09:59:07 henrik Exp $";
 
 /*
  * The alert API defines three functions that must be implemented:
@@ -679,7 +679,7 @@
 				errprintf("Ignored unknown/unexpected token '%s' at line %d\n", p, cfid);
 			}
 
-			if (p) p = strtok(NULL, " ");
+			if (p) p = strtok(NULL, " \t");
 		}
 
 		if (curlinerecips && currcp && (curlinerecips != currcp)) {