[hobbit] core in hobbitd_alert, clientupdate

Henrik Stoerner henrik at hswn.dk
Tue Jul 25 08:22:02 CEST 2006


On Mon, Jul 24, 2006 at 01:29:36PM +0000, David Gore wrote:
> Backtrace on the core, this is the latest snapshot.

Thanks, fixed.

> I do not have the 
> patience to fully test clientupdate, so I will assume it is broken 
> otherwise and that it may be fixed in the final version.

It worked last I tested it, but I haven't had much time to look
into your report - sorry. I'll go over it once again and see if
I can find anything.


Regards,
Henrik

-------------- next part --------------
--- hobbitd/hobbitd_alert.c	2006/07/20 16:06:41	1.82
+++ hobbitd/hobbitd_alert.c	2006/07/25 06:19:06
@@ -223,7 +223,7 @@
 	char *subfn;
 	FILE *fd = fopen(filename, "w");
 	activealerts_t *awalk;
-	unsigned char *pgmsg = "", *ackmsg = "";
+	unsigned char *pgmsg, *ackmsg;
 
 	if (fd == NULL) return;
 
@@ -236,9 +236,9 @@
 			(int) awalk->eventstart,
 			(int) awalk->nextalerttime,
 			statename[awalk->state]);
-		if (awalk->pagemessage) pgmsg = nlencode(awalk->pagemessage);
+		pgmsg = (awalk->pagemessage) ? nlencode(awalk->pagemessage) : "";
 		fprintf(fd, "%s|", pgmsg);
-		if (awalk->ackmessage) ackmsg = nlencode(awalk->ackmessage);
+		ackmsg = (awalk->ackmessage) ? nlencode(awalk->ackmessage) : "";
 		fprintf(fd, "%s\n", ackmsg);
 	}
 	fclose(fd);


More information about the Xymon mailing list