[hobbit] RE: bb-findhost.sh problem

Henrik Stoerner henrik at hswn.dk
Thu Jun 8 22:50:09 CEST 2006


On Thu, Jun 08, 2006 at 07:54:50AM -0400, Michael Nemeth wrote:
> HA! found the problem and it has nothing to do direct with findhost ; I 
> discovered it was broken in info
> PAGE.submage link too.   There no slash /  after the url  that is :
> 
> http://faraday.lmco.com/hobbit/others
> Fails
> But
> http://faraday.lmco.com/hobbit/others/
> works
> Now what the fix?

I think it's attached.


Regards,
Henrik

PS: This really is one of those bugs that I would never have found
without someone else testing.

-------------- next part --------------
--- web/bb-findhost.c	2006/05/03 21:12:33	1.29
+++ web/bb-findhost.c	2006/06/08 20:46:41
@@ -37,7 +37,7 @@
  *
  */
 
-static char rcsid[] = "$Id: bb-findhost.c,v 1.29 2006/05/03 21:12:33 henrik Exp $";
+static char rcsid[] = "$Id: bb-findhost.c,v 1.30 2006/06/08 20:46:33 henrik Exp $";
 
 #include <stdio.h>
 #include <string.h>
@@ -177,7 +177,7 @@
 				/*  match */
 				printf("<tr>\n");
 				printf("<td align=left> %s </td>\n", displayname ? displayname : hostname);
-				printf("<td align=left> <a href=\"%s/%s#%s\">%s</a>\n",
+				printf("<td align=left> <a href=\"%s/%s/#%s\">%s</a>\n",
 	                     		xgetenv("BBWEB"), 
 					bbh_item(hostwalk, BBH_PAGEPATH),
 					hostname,
@@ -185,7 +185,7 @@
 
 				clonewalk = hostwalk->next;
 				while (clonewalk && (strcmp(hostwalk->bbhostname, clonewalk->bbhostname) == 0)) {
-					printf("<br><a href=\"%s/%s#%s\">%s</a>\n",
+					printf("<br><a href=\"%s/%s/#%s\">%s</a>\n",
 						xgetenv("BBWEB"), 
 						bbh_item(clonewalk, BBH_PAGEPATH),
 						clonewalk->bbhostname,
--- web/hobbitsvc-info.c	2006/06/03 10:47:38	1.106
+++ web/hobbitsvc-info.c	2006/06/08 20:46:42
@@ -12,7 +12,7 @@
 /*                                                                            */
 /*----------------------------------------------------------------------------*/
 
-static char rcsid[] = "$Id: hobbitsvc-info.c,v 1.106 2006/06/03 10:47:38 henrik Exp $";
+static char rcsid[] = "$Id: hobbitsvc-info.c,v 1.107 2006/06/08 20:46:33 henrik Exp $";
 
 #include <limits.h>
 #include <stdio.h>
@@ -559,7 +559,7 @@
 	}
 
 	val = bbh_item(hostwalk, BBH_PAGEPATH);
-	sprintf(l, "<tr><th align=left>Page/subpage:</th><td align=left><a href=\"%s/%s\">%s</a>\n", 
+	sprintf(l, "<tr><th align=left>Page/subpage:</th><td align=left><a href=\"%s/%s/\">%s</a>\n", 
 		xgetenv("BBWEB"), val, bbh_item(hostwalk, BBH_PAGEPATHTITLE));
 	addtobuffer(infobuf, l);
 


More information about the Xymon mailing list