[hobbit] status+LIFETIME in 4.2-RC-20060712
Henrik Stoerner
henrik at hswn.dk
Thu Aug 3 20:29:10 CEST 2006
On Thu, Aug 03, 2006 at 02:44:08PM +0200, Henrik Stoerner wrote:
> On Thu, Aug 03, 2006 at 06:59:55AM -0500, Ralph Mitchell wrote:
> > I hope someone can tell me what I'm doing wrong here...
>
> I cannot see anything immediately wrong. And I can reproduce the problem
> here. Stay tuned ...
It was a combination of having multiple servers in BBDISPLAYS, and
the use of a lifetime setting on the status message. Patch attached.
Regards,
Henrik
-------------- next part --------------
--- lib/sendmsg.c 2006/07/20 16:06:41 1.80
+++ lib/sendmsg.c 2006/08/03 18:26:47
@@ -419,8 +419,9 @@
{
int result = 0;
- if (strcmp(onercpt, "0.0.0.0") != 0)
+ if (strcmp(onercpt, "0.0.0.0") != 0) {
result = sendtobbd(onercpt, msg, respfd, respstr, fullresponse, timeout);
+ }
else if (morercpts) {
char *bbdlist, *rcpt;
int first = 1;
@@ -473,7 +474,7 @@
scheduleaction = ((strncmp(msg, "schedule", 8) == 0) && (strlen(msg) > 8));
/* See if this is a multi-recipient command */
- i = strcspn(msg, " \t\r\n");
+ i = strspn(msg, "abcdefghijklmnopqrstuvwxyz");
msgcmd = (char *)malloc(i+1);
strncpy(msgcmd, msg, i); *(msgcmd+i) = '\0';
for (i = 0; (multircptcmds[i] && strcmp(multircptcmds[i], msgcmd)); i++) ;
More information about the Xymon
mailing list