[hobbit] todays snapshot (060220)

Henrik Stoerner henrik at hswn.dk
Mon Feb 20 09:11:38 CET 2006


On Mon, Feb 20, 2006 at 08:41:37AM +0100, lars ebeling wrote:
> I found a coredump in cgi-bin

OK, think I've got it. Save attached to /tmp/hobbitsvc.patch,
then run "patch web/hobbitsvc.c </tmp/hobbitsvc.patch"


Regards,
Henrik

-------------- next part --------------
--- web/hobbitsvc.c	2006/02/17 11:38:21	1.61
+++ web/hobbitsvc.c	2006/02/20 08:08:59
@@ -192,8 +192,6 @@
 		time_t logage;
 		char *sumline, *msg, *p;
 
-		sethostenv(displayname, ip, service, colorname(COL_GREEN), hostname);
-		sethostenv_refresh(60);
 		sprintf(hobbitdreq, "hobbitdlog host=%s test=%s fields=hostname,testname,color,flags,lastchange,logtime,validtime,acktime,disabletime,sender,cookie,ackmsg,dismsg,client,acklist,BBH_IP,BBH_DISPLAYNAME", hostname, service);
 		hobbitdresult = sendmessage(hobbitdreq, NULL, NULL, &log, 1, 30);
 		if ((hobbitdresult != BB_OK) || (log == NULL) || (strlen(log) == 0)) {
@@ -275,6 +273,9 @@
 
 		ip = (items[15] ? items[15] : "");
 		displayname = (items[16] ? items[16] : hostname);
+
+		sethostenv(displayname, ip, service, colorname(COL_GREEN), hostname);
+		sethostenv_refresh(60);
 	}
 	else if (source == SRC_HISTLOGS) {
 		char logfn[PATH_MAX];


More information about the Xymon mailing list